MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / __rmul__

Method __rmul__

Python/Turtle.py:156–159  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

154 return self[0]*other[0]+self[1]*other[1]
155 return Vec2D(self[0]*other, self[1]*other)
156 def __rmul__(self, other):
157 if isinstance(other, int) or isinstance(other, float):
158 return Vec2D(self[0]*other, self[1]*other)
159 return NotImplemented
160 def __sub__(self, other):
161 return Vec2D(self[0]-other[0], self[1]-other[1])
162 def __neg__(self):

Callers

nothing calls this directly

Calls 1

Vec2DClass · 0.85

Tested by

no test coverage detected