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

Method __sub__

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

Source from the content-addressed store, hash-verified

111 return Vector2(self.x + obj, self.y + obj)
112
113 def __sub__(self, obj):
114 if isinstance(obj, Vector2):
115 return Vector2(self.x - obj.x, self.y - obj.y)
116 return Vector2(self.x - obj, self.y - obj)
117
118 def __mul__(self, obj):
119 if isinstance(obj, Vector2):

Callers

nothing calls this directly

Calls 1

Vector2Class · 0.70

Tested by

no test coverage detected