mirror of
https://github.com/recp/cglm.git
synced 2025-10-03 16:51:35 +00:00
add documentation for clamp
This commit is contained in:
@@ -18,6 +18,9 @@ Functions:
|
||||
#. :c:func:`glm_make_rad`
|
||||
#. :c:func:`glm_make_deg`
|
||||
#. :c:func:`glm_pow2`
|
||||
#. :c:func:`glm_min`
|
||||
#. :c:func:`glm_max`
|
||||
#. :c:func:`glm_clamp`
|
||||
|
||||
Functions documentation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -91,3 +94,15 @@ Functions documentation
|
||||
|
||||
Returns:
|
||||
maximum value
|
||||
|
||||
.. c:function:: void glm_clamp(float val, float minVal, float maxVal)
|
||||
|
||||
constrain a value to lie between two further values
|
||||
|
||||
Parameters:
|
||||
| *[in]* **val** input value
|
||||
| *[in]* **minVal** minimum value
|
||||
| *[in]* **maxVal** maximum value
|
||||
|
||||
Returns:
|
||||
clamped value
|
||||
|
@@ -53,6 +53,7 @@ Functions:
|
||||
#. :c:func:`glm_vec_maxv`
|
||||
#. :c:func:`glm_vec_minv`
|
||||
#. :c:func:`glm_vec_ortho`
|
||||
#. :c:func:`glm_vec_clamp`
|
||||
|
||||
Functions documentation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -271,3 +272,12 @@ Functions documentation
|
||||
Parameters:
|
||||
| *[in]* **mat** vector
|
||||
| *[out]* **dest** orthogonal/perpendicular vector
|
||||
|
||||
.. c:function:: void glm_vec_clamp(vec3 v, float minVal, float maxVal)
|
||||
|
||||
constrain a value to lie between two further values
|
||||
|
||||
Parameters:
|
||||
| *[in, out]* **v** vector
|
||||
| *[in]* **minVal** minimum value
|
||||
| *[in]* **maxVal** maximum value
|
||||
|
@@ -39,6 +39,7 @@ Functions:
|
||||
#. :c:func:`glm_vec4_distance`
|
||||
#. :c:func:`glm_vec4_maxv`
|
||||
#. :c:func:`glm_vec4_minv`
|
||||
#. :c:func:`glm_vec4_clamp`
|
||||
|
||||
Functions documentation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -203,3 +204,12 @@ Functions documentation
|
||||
| *[in]* **v1** vector1
|
||||
| *[in]* **v2** vector2
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_vec4_clamp(vec4 v, float minVal, float maxVal)
|
||||
|
||||
constrain a value to lie between two further values
|
||||
|
||||
Parameters:
|
||||
| *[in, out]* **v** vector
|
||||
| *[in]* **minVal** minimum value
|
||||
| *[in]* **maxVal** maximum value
|
||||
|
Reference in New Issue
Block a user