shz_quat_normalize
SHZ_INLINE shz_quat_t shz_quat_normalize(shz_quat_t quat) SHZ_NOEXCEPT;Returns the normalized form of the given quaternion.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
quat | shz_quat_t | The quaternion to normalize. |
Returns
Section titled “Returns”The unit quaternion in the same direction as quat.
Details
Section titled “Details”This is the fastest normalization routine, which does not check for a zero-length quaternion.
Warnings
Section titled “Warnings”- Results in a division-by-zero when
quathas a magnitude of0.0f.
Availability
Section titled “Availability”- C++ equivalent:
shz::quat::normalized - Type-generic form: none
- Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_quat.h:319 - Module: Quaternion, section "Modifiers"