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

Method __abs__

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

Source from the content-addressed store, hash-verified

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):
167 """rotate self counterclockwise by angle
168 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected