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)
def test_axis(self): q = Quaternion.from_x_rotation(np.pi / 2.0) self.assertTrue(np.allclose(q.axis, quaternion.rotation_axis(q)))
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)