Lines Matching refs:Vec2D
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)
151 vec2 = Vec2D(0.0, 1)
152 vec3 = Vec2D(42, 1)
160 vec = Vec2D(0.5, 2)
165 self.assertIsInstance(unpickled, Vec2D)
171 op1 = Vec2D(*first)
172 op2 = Vec2D(*second)
176 expected = Vec2D(*expected)
201 vec1 = Vec2D(10, 10)
202 vec2 = Vec2D(0.5, 3)
207 vec = Vec2D(0.5, 3)
209 expected = Vec2D(5, 30)
213 vec = Vec2D(10, -10)
218 vec = Vec2D(6, 8)
222 vec = Vec2D(0, 0)
226 vec = Vec2D(2.5, 6)
242 vec = Vec2D(*vec)
282 expected = Vec2D(150, 0)
288 expected = Vec2D(0, 150)
295 expected = Vec2D(-200, 0)
301 expected = Vec2D(0, 200)
307 self.assertAlmostEqual(self.nav.distance(Vec2D(0,0)), expected)
334 self.assertEqual(self.nav.towards(Vec2D(x, y)), expected)
400 vec = Vec2D(0.22, .001)