Example #1
0
 def test_rotation_axis(self):
     result = quaternion.rotation_axis(
         [5.77350000e-01, 5.77350000e-01, 5.77350000e-01, 6.12323400e-17])
     np.testing.assert_almost_equal(result, [0.57735, 0.57735, 0.57735],
                                    decimal=5)
Example #2
0
 def test_axis(self):
     q = Quaternion.from_x_rotation(np.pi / 2.0)
     self.assertTrue(np.allclose(q.axis, quaternion.rotation_axis(q)))
Example #3
0
 def test_rotation_axis(self):
     result = quaternion.rotation_axis([5.77350000e-01, 5.77350000e-01, 5.77350000e-01, 6.12323400e-17])
     np.testing.assert_almost_equal(result, [0.57735, 0.57735, 0.57735], decimal=5)
Example #4
0
 def test_axis(self):
     q = Quaternion.from_x_rotation(np.pi / 2.0)
     self.assertTrue(np.allclose(q.axis, quaternion.rotation_axis(q)))