Skip to content

shz_quat_from_rotation_xyz_u16

Markdown
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).

NameTypeDescription
xAngleuint16_t
yAngleuint16_t
zAngleuint16_t

shz_quat_t

For games whose orientations are stored as 16-bit angles, such as N64 titles. Signed 16-bit angles can be passed as they are. The half angles go to FSCA directly, without a conversion to radians, so an odd angle is off by half a unit (1/131072 of a turn) in its half angle.

  • u16: Angle is a 16-bit fixed-point value: 0..65535 maps to 0..2π, the native FSCA input format. (Naming and Suffixes)

shz_sincosu16