def test_quaternion_vectors(self): a = Quaternion(0, 0, 0, 1) b = Matrix((4, 1), (1, 2, 3, 4)) assert a @ b @ a.inverse() == Quaternion(1, 2, 3, 4)
def test_quaternion_product_inverse(self): a = Quaternion(2, 2, 2, 2) b = a.inverse() assert a @ b == Quaternion() assert b @ a == Quaternion()