safeNormalize

Returns a quaternion whose length 1 from target vector. When the length is 0, returns zero quaternion.

safeNormalize
(
T
)
(
const Quaternion!(T) q
)
if (
__traits(isFloating, T)
)

Return Value

Type: Quaternion!(T)

normalized target quaternion if the length is greater than 0, otherwise zero vector

Meta