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

Method __neg__

Python/Turtle.py:162–163  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

160 def __sub__(self, other):
161 return Vec2D(self[0]-other[0], self[1]-other[1])
162 def __neg__(self):
163 return Vec2D(-self[0], -self[1])
164 def __abs__(self):
165 return (self[0]**2 + self[1]**2)**0.5
166 def rotate(self, angle):

Callers

nothing calls this directly

Calls 1

Vec2DClass · 0.85

Tested by

no test coverage detected