shz_quat_from_rotation_xyz_u16
SHZ_INLINE shz_quat_t shz_quat_from_rotation_xyz_u16(uint16_t xAngle, uint16_t yAngle, uint16_t zAngle) SHZ_NOEXCEPT;Equivalent to shz_quat_from_rotation_xyz(), with 16-bit binary angles (65536 per turn, the FSCA unit).
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
xAngle | uint16_t | |
yAngle | uint16_t | |
zAngle | uint16_t |
Returns
Section titled “Returns”shz_quat_t
Details
Section titled “Details”For games whose orientations are stored as 16-bit angles, such as N64 titles. Signed 16-bit angles can be passed as they are. Each angle is halved with an arithmetic shift and passed straight to shz_sincosu16(), so the half angles are quantized to FSCA's 1/65536 of a turn, which can be off by up to half a unit for odd angles.
Naming and requirements
Section titled “Naming and requirements”u16: Angle is a 16-bit fixed-point value: 0..65535 maps to 0..2π, the nativeFSCAinput format. (Naming and Suffixes)
Availability
Section titled “Availability”- C++ equivalent:
shz::quat::from_rotation_xyz_u16 - Type-generic form: none
- Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_quat.h:98 - Module: Quaternion, section "Initialization"