Skip to content

shz_quat_magnitude_fsrra

Markdown
SHZ_INLINE float shz_quat_magnitude_fsrra(shz_quat_t quat) SHZ_NOEXCEPT;

Returns the magnitude of the given quaternion, unsafely, using FSRRA.

NameTypeDescription
quatshz_quat_tThe quaternion whose magnitude is returned.

The magnitude of quat.

Faster alternative to shz_quat_magnitude() which does not check for a zero-length quaternion.

  • Results in a division-by-zero when quat has a magnitude of 0.0f.
  • _fsrra: Uses FSRRA (fast approximate 1/sqrt(x)). The argument or denominator must be positive. Faster, less precise. (Naming and Suffixes)

shz_quat_magnitude