Example #1
0
def test_normalize():
    q1 = Quat(0.4619398, 0.1913417, 0.4619398, 0.7325378)  # 45 around X then Y then Z
    t1 = Transform(q1, Vec3.zero())

    assert t1.is_normalized()

    q2 = Quat(3, 0, 4, 7)
    t2 = Transform(q2, Vec3.zero())
    assert not t2.is_normalized()

    t2.normalize()
    assert t2.is_normalized()