shz_vec3_rotate_dir_u16
SHZ_INLINE shz_vec3_t shz_vec3_rotate_dir_u16(shz_vec3_t vec, uint16_t radians16, shz_vec3_t axis) SHZ_NOEXCEPT;Equivalent to shz_vec3_rotate_dir(), with a 16-bit binary angle.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
vec | shz_vec3_t | The vector to rotate. |
radians16 | uint16_t | Angle of rotation, as a 16-bit binary angle. |
axis | shz_vec3_t | Unit-length axis of rotation. |
Returns
Section titled “Returns”vec rotated by radians16 about axis.
Warnings
Section titled “Warnings”- The axis of rotation must be prenormalized!
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: none (call the C function from C++)
- Type-generic form: none
- Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_vector.h:1261 - Module: Vector, section "Rotations"