quaternion_is_unit

compas.geometry.quaternion_is_unit(q, tol=None)[source]

Checks if a quaternion is unit-length.

Parameters:
q[float, float, float, float] | compas.geometry.Quaternion

Quaternion or sequence of four floats [w, x, y, z].

tolfloat, optional

The tolerance for comparing the quaternion norm to 1. Default is TOL.absolute.

Returns:
bool

True if the quaternion is unit-length, and False if otherwise.