Searched refs:Vec2D (Results 1 – 5 of 5) sorted by relevance
/external/python/cpython2/Lib/test/ |
D | test_turtle.py | 6 Vec2D = turtle.Vec2D variable 134 vec = Vec2D(0.5, 2) 137 self.assertIsInstance(vec, Vec2D) 139 self.assertRaises(TypeError, Vec2D) 140 self.assertRaises(TypeError, Vec2D, 0) 141 self.assertRaises(TypeError, Vec2D, (0, 1)) 142 self.assertRaises(TypeError, Vec2D, vec) 143 self.assertRaises(TypeError, Vec2D, 0, 1, 2) 146 vec = Vec2D(0.567, 1.234) 150 vec1 = Vec2D(0, 1) [all …]
|
/external/python/cpython2/Lib/lib-tk/ |
D | turtle.py | 256 class Vec2D(tuple): class 273 return Vec2D(self[0]+other[0], self[1]+other[1]) 275 if isinstance(other, Vec2D): 277 return Vec2D(self[0]*other, self[1]*other) 280 return Vec2D(self[0]*other, self[1]*other) 282 return Vec2D(self[0]-other[0], self[1]-other[1]) 284 return Vec2D(-self[0], -self[1]) 290 perp = Vec2D(-self[1], self[0]) 293 return Vec2D(self[0]*c+perp[0]*s, self[1]*c+perp[1]*s) 1431 "standard": Vec2D(1.0, 0.0), [all …]
|
/external/python/cpython2/Demo/turtle/ |
D | tdemo_planet_and_moon.py | 20 from turtle import Shape, Turtle, mainloop, Vec2D as Vec
|
D | about_turtle.txt | 64 - The implementation uses a 2-vector class named Vec2D, derived from tuple.
|
/external/python/cpython2/Doc/library/ |
D | turtle.rst | 320 If *y* is ``None``, *x* must be a pair of coordinates or a :class:`Vec2D` 608 Return the turtle's current location (x,y) (as a :class:`Vec2D` vector). 1961 .. class:: Vec2D(x, y) 2214 | | gravitational system | :class:`Vec2D` |
|