def testInvalidRotationOrder(): matrixToEuler(np.eye(3), order='invalid')
def checkMatrixToEuler(order, degrees): q1 = randomRotation() m = q1.toMatrix() e = matrixToEuler(m, order, degrees) q2 = QuaternionFromEuler(e, order, degrees) assertQuaternionAlmostEqual(q1,q2)
def checkZXY(matrix, euler): testing.assert_almost_equal(matrixToEuler(matrix, order='zxy', inDegrees=True), euler) testing.assert_almost_equal(matrixFromEuler(euler, order='zxy'), matrix)
def testUnkownRotationOrder(): matrixToEuler(np.eye(3), order='zxz')