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

Method __divmod__

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

Source from the content-addressed store, hash-verified

136 return Vector2(self.x % obj, self.y % obj)
137
138 def __divmod__(self, obj):
139 if isinstance(obj, Vector2):
140 return (Vector2(self.x // obj.x, self.y // obj.y),
141 Vector2(self.x % obj.x, self.y % obj.y))
142 return (Vector2(self.x // obj, self.y // obj),
143 Vector2(self.x % obj, self.y % obj))
144
145 def __pow__(self, obj):
146 if isinstance(obj, Vector2):

Callers

nothing calls this directly

Calls 1

Vector2Class · 0.70

Tested by

no test coverage detected