Quaternion.canonize

Quaternion.canonize()[source]

Makes the quaternion canonic.

Returns

None

Examples

>>> from compas.geometry import Frame
>>> q = Quaternion.from_frame(Frame.worldZX())
>>> q
Quaternion(-0.500, 0.500, 0.500, 0.500)
>>> q.canonize()
>>> q
Quaternion(0.500, -0.500, -0.500, -0.500)