mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
Added asTuple()
This commit is contained in:
parent
83237997b5
commit
22b4a9c3b8
@ -14,3 +14,11 @@ def pPrintValues(self):
|
|||||||
return "% 10.4f, % 10.4f, % 10.4f" % (self[0], self[1], self[2])
|
return "% 10.4f, % 10.4f, % 10.4f" % (self[0], self[1], self[2])
|
||||||
Dtool_funcToMethod(pPrintValues, VBase3)
|
Dtool_funcToMethod(pPrintValues, VBase3)
|
||||||
del pPrintValues
|
del pPrintValues
|
||||||
|
|
||||||
|
def asTuple(self):
|
||||||
|
"""
|
||||||
|
Returns the vector as a tuple.
|
||||||
|
"""
|
||||||
|
return (self[0], self[1], self[2])
|
||||||
|
Dtool_funcToMethod(asTuple, VBase3)
|
||||||
|
del asTuple
|
||||||
|
@ -14,3 +14,11 @@ def pPrintValues(self):
|
|||||||
return "% 10.4f, % 10.4f, % 10.4f, % 10.4f" % (self[0], self[1], self[2], self[3])
|
return "% 10.4f, % 10.4f, % 10.4f, % 10.4f" % (self[0], self[1], self[2], self[3])
|
||||||
Dtool_funcToMethod(pPrintValues, VBase4)
|
Dtool_funcToMethod(pPrintValues, VBase4)
|
||||||
del pPrintValues
|
del pPrintValues
|
||||||
|
|
||||||
|
def asTuple(self):
|
||||||
|
"""
|
||||||
|
Returns the vector as a tuple.
|
||||||
|
"""
|
||||||
|
return (self[0], self[1], self[2], self[3])
|
||||||
|
Dtool_funcToMethod(asTuple, VBase4)
|
||||||
|
del asTuple
|
||||||
|
Loading…
x
Reference in New Issue
Block a user