vec2: add new function glm_vec2_make

Just a copy of glm_vec2, but with the
word _make suffixed at the end.

Function takes in a float array array must be
at least of size 2 and converts it into
a 2D vector.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
This commit is contained in:
Vincent Davis Jr
2023-07-02 11:59:39 -05:00
parent 49dd24eaf2
commit b3de85a14e
7 changed files with 72 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ Functions:
#. :c:func:`glm_vec2_minv`
#. :c:func:`glm_vec2_clamp`
#. :c:func:`glm_vec2_lerp`
#. :c:func:`glm_vec2_make`
Functions documentation
~~~~~~~~~~~~~~~~~~~~~~~
@@ -373,3 +374,12 @@ Functions documentation
| *[in]* **to** to value
| *[in]* **t** interpolant (amount) clamped between 0 and 1
| *[out]* **dest** destination
.. c:function:: void glm_vec2_make(float * __restrict src, vec2 dest)
Create two dimensional vector from pointer
| NOTE: **@src** must contain at least 2 elements.
Parameters:
| *[in]* **src** pointer to an array of floats
| *[out]* **dest** destination vector