Skip to content

cf_quat_nlerp

Category: math
GitHub: cute_math3d.h


Normalized linear interpolation between two rotations -- slerp's cheap cousin.

CF_Quat cf_quat_nlerp(CF_Quat a, CF_Quat b, float t)
Parameters Description
a The rotation at t == 0.
b The rotation at t == 1.
t The interpolant, from 0 to 1.

Return Value

Returns a unit quaternion along the shortest arc from a to b.

Remarks

Same endpoints and same arc as cf_quat_slerp, but the angular velocity is not constant across t. For small differences -- animation keyframes, per-frame smoothing -- the deviation is invisible and this is measurably cheaper.

CF_Quat
cf_quat_slerp
cf_quat_norm
cf_lerp