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)
166 self.assertIsInstance(unpickled, Vec2D)
174 op1 = Vec2D(*first)
175 op2 = Vec2D(*second)
179 expected = Vec2D(*expected)
204 vec1 = Vec2D(10, 10)
205 vec2 = Vec2D(0.5, 3)
210 vec = Vec2D(0.5, 3)
212 expected = Vec2D(5, 30)
216 vec = Vec2D(10, -10)
221 vec = Vec2D(6, 8)
225 vec = Vec2D(0, 0)
229 vec = Vec2D(2.5, 6)
246 vec = Vec2D(*vec)
286 expected = Vec2D(150, 0)
292 expected = Vec2D(0, 150)
299 expected = Vec2D(-200, 0)
305 expected = Vec2D(0, 200)
311 self.assertAlmostEqual(self.nav.distance(Vec2D(0,0)), expected)
338 self.assertEqual(self.nav.towards(Vec2D(x, y)), expected)
404 vec = Vec2D(0.22, .001)