Poodletooth-iLand/panda/direct/extensions_native/VBase3_extensions.py
Master Jumblespeed d882959bfa switch to remote
2015-05-18 22:11:33 -04:00

20 lines
495 B
Python
Executable file

"""
Methods to extend functionality of the VBase3 class
"""
def pPrintValues(self):
"""
Pretty print
"""
return "% 10.4f, % 10.4f, % 10.4f" % (self[0], self[1], self[2])
Dtool_funcToMethod(pPrintValues, VBase3)
del pPrintValues
def asTuple(self):
"""
Returns the vector as a tuple.
"""
print "Warning: VBase3.asTuple() is no longer needed and deprecated. Use the vector directly instead."
return tuple(self)
Dtool_funcToMethod(asTuple, VBase3)
del asTuple