コード例 #1
0
 def test_negate(self):
     result = quaternion.negate([1., 2., 3., 4.])
     np.testing.assert_almost_equal(result, [-1., -2., -3., -4.], decimal=5)
コード例 #2
0
 def test_negate_unit(self):
     result = quaternion.negate([0., 0., 0., 1.])
     np.testing.assert_almost_equal(result, [0., 0., 0., -1.], decimal=5)
コード例 #3
0
 def test_negate(self):
     result = quaternion.negate([1., 2., 3., 4.])
     np.testing.assert_almost_equal(result, [-1., -2., -3., -4.], decimal=5)
コード例 #4
0
 def test_negate_unit(self):
     result = quaternion.negate([0., 0., 0., 1.])
     np.testing.assert_almost_equal(result, [0., 0., 0., -1.], decimal=5)
コード例 #5
0
ファイル: test_quaternion.py プロジェクト: kthulhu/Pyrr
 def test_negative(self):
     q = Quaternion.from_x_rotation(np.pi / 2.0)
     self.assertTrue(np.allclose(q.negative, quaternion.negate(q)))
コード例 #6
0
ファイル: test_quaternion.py プロジェクト: abarch/Pyrr
 def test_negative(self):
     q = Quaternion.from_x_rotation(np.pi / 2.0)
     self.assertTrue(np.allclose(q.negative, quaternion.negate(q)))