Quaternion.canonized

Quaternion.canonized()[source]

Returns a quaternion in canonic form.

Returns:
compas.geometry.Quaternion

A quaternion in canonic form.

Examples

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