added Vertex method to allow for +=

This commit is contained in:
Stephen M. McQuay 2012-05-30 22:57:26 -06:00
parent 443363a7a4
commit 23f343a608

View File

@ -95,6 +95,8 @@ class Vertex(list):
# for now just assume type(other) = Vertex... bad, I know # for now just assume type(other) = Vertex... bad, I know
return Vertex(self.x + other.x, self.y + other.y, self.z + other.z) return Vertex(self.x + other.x, self.y + other.y, self.z + other.z)
__iadd__ = __add__
def __radd__(self, other): def __radd__(self, other):
return other + self return other + self