MCPcopy Create free account
hub / github.com/ActiveState/code / __mul__

Method __mul__

recipes/Python/578006_vector/recipe-578006.py:118–121  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

116 return Vector2(self.x - obj, self.y - obj)
117
118 def __mul__(self, obj):
119 if isinstance(obj, Vector2):
120 return Vector2(self.x * obj.x, self.y * obj.y)
121 return Vector2(self.x * obj, self.y * obj)
122
123 def __truediv__(self, obj):
124 if isinstance(obj, Vector2):

Callers

nothing calls this directly

Calls 1

Vector2Class · 0.70

Tested by

no test coverage detected