Home
last modified time | relevance | path

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

/external/python/cpython2/Lib/test/
Dtest_turtle.py6 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/cpython3/Lib/test/
Dtest_turtle.py6 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/
Dturtle.py256 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/cpython3/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)
262 return Vec2D(self[0]-other[0], self[1]-other[1])
264 return Vec2D(-self[0], -self[1])
270 perp = Vec2D(-self[1], self[0])
273 return Vec2D(self[0]*c+perp[0]*s, self[1]*c+perp[1]*s)
1515 "standard": Vec2D(1.0, 0.0),
[all …]
/external/python/cpython2/Demo/turtle/
Dtdemo_planet_and_moon.py20 from turtle import Shape, Turtle, mainloop, Vec2D as Vec
Dabout_turtle.txt64 - The implementation uses a 2-vector class named Vec2D, derived from tuple.
/external/python/cpython3/Lib/turtledemo/
Dplanet_and_moon.py20 from turtle import Shape, Turtle, mainloop, Vec2D as Vec
/external/skqp/third_party/Nima-Cpp/
DBUILD.gn86 "../externals/Nima-Math-Cpp/Source/Vec2D.cpp",
/external/skia/third_party/Nima-Cpp/
DBUILD.gn86 "../externals/Nima-Math-Cpp/Source/Vec2D.cpp",
/external/python/cpython2/Doc/library/
Dturtle.rst320 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` |
/external/python/cpython3/Doc/library/
Dturtle.rst340 If *y* is ``None``, *x* must be a pair of coordinates or a :class:`Vec2D`
628 Return the turtle's current location (x,y) (as a :class:`Vec2D` vector).
2087 .. class:: Vec2D(x, y)
2352 | | gravitational system | :class:`Vec2D` |