quat: add new function glm_quat_make

Function takes in a 4 element float array
and converts it into a quaternion.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
This commit is contained in:
Vincent Davis Jr
2023-06-28 22:49:49 -05:00
parent 6d39ef0026
commit bfe5ea6ab7
7 changed files with 66 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ Functions:
#. :c:func:`glm_quat_rotate`
#. :c:func:`glm_quat_rotate_at`
#. :c:func:`glm_quat_rotate_atm`
#. :c:func:`glm_quat_make`
Functions documentation
~~~~~~~~~~~~~~~~~~~~~~~
@@ -420,3 +421,13 @@ Functions documentation
| *[in, out]* **m** existing transform matrix to rotate
| *[in]* **q** quaternion
| *[in]* **pivot** pivot
.. c:function:: void glm_quat_make(float * __restrict src, versor dest)
Create quaternion from pointer
| NOTE: **@src** must contain 4 elements. cglm store quaternions as [x, y, z, w].
Parameters:
| *[in]* **src** pointer to an array of floats
| *[out]* **dest** destination quaternion