Ejemplo n.º 1
0
 def testDot(self):
     self.assertEqual(UNIT_X.dot(UNIT_X), 1.)
     self.assertEqual(UNIT_X.dot(UNIT_Y), 0.)
     self.assertEqual(UNIT_X.dot(UNIT_Z), 0.)
     self.assertEqual(UNIT_Y.dot(UNIT_Y), 1.)
     self.assertEqual(UNIT_Y.dot(UNIT_Z), 0.)
     self.assertEqual(UNIT_Z.dot(UNIT_Z), 1.)
Ejemplo n.º 2
0
 def testDot(self):
     self.assertEqual(UNIT_X.dot(UNIT_X), 1.)
     self.assertEqual(UNIT_X.dot(UNIT_Y), 0.)
     self.assertEqual(UNIT_X.dot(UNIT_Z), 0.)
     self.assertEqual(UNIT_Y.dot(UNIT_Y), 1.)
     self.assertEqual(UNIT_Y.dot(UNIT_Z), 0.)
     self.assertEqual(UNIT_Z.dot(UNIT_Z), 1.)
Ejemplo n.º 3
0
    def testDot(self):
        self.assertEqual(UNIT_X.dot(UNIT_X), 1.)
        self.assertEqual(UNIT_X.dot(UNIT_Y), 0.)
        self.assertEqual(UNIT_X.dot(UNIT_Z), 0.)
        self.assertEqual(UNIT_Y.dot(UNIT_Y), 1.)
        self.assertEqual(UNIT_Y.dot(UNIT_Z), 0.)
        self.assertEqual(UNIT_Z.dot(UNIT_Z), 1.)

        self.assertEqual(UNIT_X.dot((1,0,0)), 1.)
        self.assertEqual(UNIT_X.dot(np.array((1,0,0), dtype=np.float)), 1.)
Ejemplo n.º 4
0
    def testDot(self):
        self.assertEqual(UNIT_X.dot(UNIT_X), 1.)
        self.assertEqual(UNIT_X.dot(UNIT_Y), 0.)
        self.assertEqual(UNIT_X.dot(UNIT_Z), 0.)
        self.assertEqual(UNIT_Y.dot(UNIT_Y), 1.)
        self.assertEqual(UNIT_Y.dot(UNIT_Z), 0.)
        self.assertEqual(UNIT_Z.dot(UNIT_Z), 1.)

        self.assertEqual(UNIT_X.dot((1,0,0)), 1.)
        self.assertEqual(UNIT_X.dot(np.array((1,0,0), dtype=np.float)), 1.)
Ejemplo n.º 5
0
    def testCross(self):
        self.assertEqual(UNIT_X.cross(UNIT_Y), UNIT_Z)
        self.assertEqual(UNIT_Y.cross(UNIT_Z), UNIT_X)
        self.assertEqual(UNIT_Z.cross(UNIT_X), UNIT_Y)

        self.assertEqual(UNIT_X.cross((0,1,0)), UNIT_Z)
        self.assertEqual(UNIT_X.cross(np.array((0,1,0), dtype=np.float)), UNIT_Z)
Ejemplo n.º 6
0
    def testCross(self):
        self.assertEqual(UNIT_X.cross(UNIT_Y), UNIT_Z)
        self.assertEqual(UNIT_Y.cross(UNIT_Z), UNIT_X)
        self.assertEqual(UNIT_Z.cross(UNIT_X), UNIT_Y)

        self.assertEqual(UNIT_X.cross((0,1,0)), UNIT_Z)
        self.assertEqual(UNIT_X.cross(np.array((0,1,0), dtype=np.float)), UNIT_Z)
Ejemplo n.º 7
0
 def testCross(self):
     self.assertEqual(UNIT_X.cross(UNIT_Y), UNIT_Z)
     self.assertEqual(UNIT_Y.cross(UNIT_Z), UNIT_X)
     self.assertEqual(UNIT_Z.cross(UNIT_X), UNIT_Y)
Ejemplo n.º 8
0
 def testCross(self):
     self.assertEqual(UNIT_X.cross(UNIT_Y), UNIT_Z)
     self.assertEqual(UNIT_Y.cross(UNIT_Z), UNIT_X)
     self.assertEqual(UNIT_Z.cross(UNIT_X), UNIT_Y)