Skip to content

shz_xmtrx_init_rotation_x_yz

Markdown
SHZ_INLINE void shz_xmtrx_init_rotation_x_yz(float y, float z) SHZ_NOEXCEPT;

Initializes XMTRX to the rotation about the X axis that turns local +Z toward the unit direction (0, y, z).

NameTypeDescription
yfloatY component of the unit direction.
zfloatZ component of the unit direction.

Nothing (void).

Equivalent to shz_xmtrx_init_rotation_x() for the angle whose sine is -y and cosine is z, without computing an angle or going through FSCA. Useful for billboarding and for any direction that is already normalized.

  • (y, z) must be unit length.

shz_xmtrx_rotate_x_yz, shz_xmtrx_init_billboard_x