quaternion_is_unit

compas.geometry.quaternion_is_unit(q, tol=1e-06)[source]

Checks if a quaternion is unit-length.

Parameters
  • q ([float, float, float, float] | Quaternion) – Quaternion or sequence of four floats [w, x, y, z].

  • tol (float, optional) – Requested decimal precision.

Returns

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