Home
last modified time | relevance | path

Searched refs:Vec2D (Results 1 – 5 of 5) sorted by relevance

/third_party/python/Lib/test/
Dtest_turtle.py6 Vec2D = turtle.Vec2D variable
142 vec = Vec2D(0.5, 2)
145 self.assertIsInstance(vec, Vec2D)
147 self.assertRaises(TypeError, Vec2D)
148 self.assertRaises(TypeError, Vec2D, 0)
149 self.assertRaises(TypeError, Vec2D, (0, 1))
150 self.assertRaises(TypeError, Vec2D, vec)
151 self.assertRaises(TypeError, Vec2D, 0, 1, 2)
154 vec = Vec2D(0.567, 1.234)
158 vec1 = Vec2D(0, 1)
[all …]
/third_party/python/Lib/
Dturtle.py236 class Vec2D(tuple): class
253 return Vec2D(self[0]+other[0], self[1]+other[1])
255 if isinstance(other, Vec2D):
257 return Vec2D(self[0]*other, self[1]*other)
260 return Vec2D(self[0]*other, self[1]*other)
263 return Vec2D(self[0]-other[0], self[1]-other[1])
265 return Vec2D(-self[0], -self[1])
271 perp = Vec2D(-self[1], self[0])
274 return Vec2D(self[0]*c+perp[0]*s, self[1]*c+perp[1]*s)
1516 "standard": Vec2D(1.0, 0.0),
[all …]
/third_party/python/Lib/turtledemo/
Dplanet_and_moon.py20 from turtle import Shape, Turtle, mainloop, Vec2D as Vec
/third_party/python/Doc/library/
Dturtle.rst346 If *y* is ``None``, *x* must be a pair of coordinates or a :class:`Vec2D`
649 Return the turtle's current location (x,y) (as a :class:`Vec2D` vector).
2176 .. class:: Vec2D(x, y)
2441 | | gravitational system | :class:`Vec2D` |
/third_party/python/Misc/
DNEWS836 - bpo-41720: Fixed :meth:`turtle.Vec2D.__rmul__` for arguments which are not