def testProperties01(self):
     """The magnitudue of the product is the product of the magnitudes"""
     q1 = Quaternion(tuple(RA.uniform(self.min,
                                      self.max, (1, 4)).tolist()[0]))
     q2 = Quaternion(tuple(RA.uniform(self.min,
                                      self.max, (1, 4)).tolist()[0]))
     self.assertEqual((q1*q2).magnitude(), q1.magnitude()*q2.magnitude())
    def testProperties00(self):
        """The product of the conjugate is the conjucate of the product"""
        q1 = Quaternion(tuple(RA.uniform(self.min,
                                         self.max, (1, 4)).tolist()[0]))
        q2 = Quaternion(tuple(RA.uniform(self.min,
                                         self.max, (1, 4)).tolist()[0]))
##          pc = q1.conjugate()*q2.conjugate()
##          qp = q1*q2
##          cp = qp.conjugate()
##          self.assertEqual( pc, cp)
        # the commented code fails with the same error as this line...
        self.assertEqual( q1.conjugate()*q2.conjugate(), (q2*q1).conjugate())
 def testProperties01(self):
     """The magnitudue of the product is the product of the magnitudes"""
     q1 = Quaternion(
         tuple(RA.uniform(self.min, self.max, (1, 4)).tolist()[0]))
     q2 = Quaternion(
         tuple(RA.uniform(self.min, self.max, (1, 4)).tolist()[0]))
     self.assertEqual((q1 * q2).magnitude(),
                      q1.magnitude() * q2.magnitude())
 def testProperties00(self):
     """The product of the conjugate is the conjucate of the product"""
     q1 = Quaternion(
         tuple(RA.uniform(self.min, self.max, (1, 4)).tolist()[0]))
     q2 = Quaternion(
         tuple(RA.uniform(self.min, self.max, (1, 4)).tolist()[0]))
     ##          pc = q1.conjugate()*q2.conjugate()
     ##          qp = q1*q2
     ##          cp = qp.conjugate()
     ##          self.assertEqual( pc, cp)
     # the commented code fails with the same error as this line...
     self.assertEqual(q1.conjugate() * q2.conjugate(),
                      (q2 * q1).conjugate())
 def testProperties02(self):
     """The conjugate of a unit quaternion is it's inverse"""
     q1 = Quaternion(
         tuple(RA.uniform(self.min, self.max, (1, 4)).tolist()[0]))
     self.assertEqual(q1.conjugate(), q1.inverse())
 def testProperties02(self):
     """The conjugate of a unit quaternion is it's inverse"""
     q1 = Quaternion(tuple(RA.uniform(self.min,
                                      self.max, (1, 4)).tolist()[0]))
     self.assertEqual( q1.conjugate(), q1.inverse())