diff --git a/docs/source/quat.rst b/docs/source/quat.rst index 4f424df..a8ca028 100644 --- a/docs/source/quat.rst +++ b/docs/source/quat.rst @@ -52,6 +52,7 @@ Functions: #. :c:func:`glm_quat_mat3` #. :c:func:`glm_quat_mat3t` #. :c:func:`glm_quat_lerp` +#. :c:func:`glm_quat_nlerp` #. :c:func:`glm_quat_slerp` #. :c:func:`glm_quat_look` #. :c:func:`glm_quat_for` @@ -304,6 +305,25 @@ Functions documentation | *[in]* **t** interpolant (amount) clamped between 0 and 1 | *[out]* **dest** result quaternion +.. c:function:: void glm_quat_nlerp(versor q, versor r, float t, versor dest) + + | interpolates between two quaternions + | taking the shortest rotation path using + | normalized linear interpolation (NLERP) + + | This is a cheaper alternative to slerp; most games use nlerp + | for animations as it visually makes little difference. + + References: + * `Understanding Slerp, Then Not Using it `_ + * `Lerp, Slerp and Nlerp `_ + + Parameters: + | *[in]* **from** from + | *[in]* **to** to + | *[in]* **t** interpolant (amount) clamped between 0 and 1 + | *[out]* **dest** result quaternion + .. c:function:: void glm_quat_slerp(versor q, versor r, float t, versor dest) | interpolates between two quaternions