Skip to content

shz_quat_transform_vec3

Markdown
SHZ_INLINE shz_vec3_t shz_quat_transform_vec3(shz_quat_t q, shz_vec3_t v) SHZ_NOEXCEPT;

Rotates a vector by the given quaternion.

NameTypeDescription
qshz_quat_t
vshz_vec3_t

shz_vec3_t

  • This routine is meant for one-off rotations of a single vector by a single quaternion. If you plan to rotate multiple vectors by the same quaternion, you should use the XMTRX API to apply the quaternion as a rotation matrix.

shz_xmtrx_apply_rotation_quat