예제 #1
0
 def test_length(self):
     vector1 = Vector2d(4, 4)
     self.assertEqual(vector1.length(), 5.656854249492381)
예제 #2
0
    def test_isZero(self):
        vector1 = Vector2d(4, 4)
        vector2 = Vector2d(0, 0)

        self.assertFalse(vector1.isZero())
        self.assertTrue(vector2.isZero())