vec: implement muladd's scalar version

This commit is contained in:
Recep Aslantas
2018-04-13 22:30:44 +03:00
parent 13345f06c1
commit 7f7007574b
8 changed files with 83 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ Functions:
#. :c:func:`glm_vec_addadd`
#. :c:func:`glm_vec_subadd`
#. :c:func:`glm_vec_muladd`
#. :c:func:`glm_vec_muladds`
#. :c:func:`glm_vec_flipsign`
#. :c:func:`glm_vec_flipsign_to`
#. :c:func:`glm_vec_inv`
@@ -253,6 +254,16 @@ Functions documentation
| *[in]* **b** vector 2
| *[out]* **dest** dest += (a * b)
.. c:function:: void glm_vec_muladds(vec3 a, float s, vec3 dest)
| mul vector with scalar and add result to sum
| it applies += operator so dest must be initialized
Parameters:
| *[in]* **a** vector
| *[in]* **s** scalar
| *[out]* **dest** dest += (a * b)
.. c:function:: void glm_vec_flipsign(vec3 v)
flip sign of all vec3 members

View File

@@ -41,6 +41,7 @@ Functions:
#. :c:func:`glm_vec4_addadd`
#. :c:func:`glm_vec4_subadd`
#. :c:func:`glm_vec4_muladd`
#. :c:func:`glm_vec4_muladds`
#. :c:func:`glm_vec4_flipsign`
#. :c:func:`glm_vec_flipsign_to`
#. :c:func:`glm_vec4_inv`
@@ -238,6 +239,16 @@ Functions documentation
| *[in]* **b** vector 2
| *[out]* **dest** dest += (a * b)
.. c:function:: void glm_vec4_muladds(vec4 a, float s, vec4 dest)
| mul vector with scalar and add result to sum
| it applies += operator so dest must be initialized
Parameters:
| *[in]* **a** vector
| *[in]* **s** scalar
| *[out]* **dest** dest += (a * b)
.. c:function:: void glm_vec4_flipsign(vec4 v)
flip sign of all vec4 members