Skip to content

cf_quat_from_axis_angle

Category: math
GitHub: cute_math3d.h


Builds a quaternion rotating about axis by radians.

CF_Quat cf_quat_from_axis_angle(CF_V3 axis, float radians)
Parameters Description
axis The axis to rotate about. Should be unit length.
radians The rotation angle, counter-clockwise when looking down the axis toward the origin.

Return Value

Returns a unit quaternion.

CF_Quat
cf_quat_identity
cf_quat_to_m4
cf_quat_norm
cf_quat_slerp