quaternion_normalize

giant.rotations.core.quaternion_math:

giant.rotations.core.quaternion_math.quaternion_normalize(quaternion)[source]

Normalizes the quaternion(s) such that the scalar term is positive and the length is 1

Parameters:

quaternion (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) – the quaternion(s) to normalize

Returns:

The normalized quaternions

Return type:

ndarray[tuple[Any, …], dtype[float64]]