mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
docs: add docs for vec3-ext
This commit is contained in:
@@ -30,3 +30,4 @@ Follow the :doc:`build` documentation for this
|
|||||||
mat4
|
mat4
|
||||||
mat3
|
mat3
|
||||||
vec3
|
vec3
|
||||||
|
vec3-ext
|
||||||
|
|||||||
98
docs/source/vec3-ext.rst
Normal file
98
docs/source/vec3-ext.rst
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
.. default-domain:: C
|
||||||
|
|
||||||
|
vec3 extra
|
||||||
|
==========
|
||||||
|
|
||||||
|
Header: cglm/vec3-ext.h
|
||||||
|
|
||||||
|
There are some functions are in called in extra header. These are called extra
|
||||||
|
because they are not used like other functions in vec3.h in the future some of
|
||||||
|
these functions ma be moved to vec3 header.
|
||||||
|
|
||||||
|
Table of contents (clik func/macro to go):
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Functions:
|
||||||
|
|
||||||
|
1. :c:func:`glm_vec_mulv`
|
||||||
|
#. :c:func:`glm_vec_broadcast`
|
||||||
|
#. :c:func:`glm_vec_eq`
|
||||||
|
#. :c:func:`glm_vec_eq_eps`
|
||||||
|
#. :c:func:`glm_vec_eq_all`
|
||||||
|
#. :c:func:`glm_vec_eqv`
|
||||||
|
#. :c:func:`glm_vec_eqv_eps`
|
||||||
|
#. :c:func:`glm_vec_max`
|
||||||
|
#. :c:func:`glm_vec_min`
|
||||||
|
|
||||||
|
Functions documentation
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. c:function:: void glm_vec_mulv(vec3 a, vec3 b, vec3 d)
|
||||||
|
|
||||||
|
multiplies individual items
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **a** vec1
|
||||||
|
| *[in]* **b** vec2
|
||||||
|
| *[out]* **d** destination (v1[0] * v2[0], v1[1] * v2[1], v1[2] * v2[2])
|
||||||
|
|
||||||
|
.. c:function:: void glm_vec_broadcast(float val, vec3 d)
|
||||||
|
|
||||||
|
fill a vector with specified value
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **val** value
|
||||||
|
| *[out]* **dest** destination
|
||||||
|
|
||||||
|
.. c:function:: bool glm_vec_eq(vec3 v, float val)
|
||||||
|
|
||||||
|
check if vector is equal to value (without epsilon)
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **v** vector
|
||||||
|
| *[in]* **val** value
|
||||||
|
|
||||||
|
.. c:function:: bool glm_vec_eq_eps(vec4 v, float val)
|
||||||
|
|
||||||
|
check if vector is equal to value (with epsilon)
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **v** vector
|
||||||
|
| *[in]* **val** value
|
||||||
|
|
||||||
|
.. c:function:: bool glm_vec_eq_all(vec3 v)
|
||||||
|
|
||||||
|
check if vectors members are equal (without epsilon)
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **v** vector
|
||||||
|
|
||||||
|
.. c:function:: bool glm_vec_eqv(vec3 v1, vec3 v2)
|
||||||
|
|
||||||
|
check if vector is equal to another (without epsilon) vector
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **vec** vector 1
|
||||||
|
| *[in]* **vec** vector 2
|
||||||
|
|
||||||
|
.. c:function:: bool glm_vec_eqv_eps(vec3 v1, vec3 v2)
|
||||||
|
|
||||||
|
check if vector is equal to another (with epsilon)
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **v1** vector1
|
||||||
|
| *[in]* **v2** vector2
|
||||||
|
|
||||||
|
.. c:function:: float glm_vec_max(vec3 v)
|
||||||
|
|
||||||
|
max value of vector
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **v** vector
|
||||||
|
|
||||||
|
.. c:function:: float glm_vec_min(vec3 v)
|
||||||
|
|
||||||
|
min value of vector
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **v** vector
|
||||||
@@ -33,9 +33,9 @@
|
|||||||
/*!
|
/*!
|
||||||
* @brief multiplies individual items, just for convenient like SIMD
|
* @brief multiplies individual items, just for convenient like SIMD
|
||||||
*
|
*
|
||||||
* @param a vec1
|
* @param[in] a vec1
|
||||||
* @param b vec2
|
* @param[in] b vec2
|
||||||
* @param d vec3 = (v1[0] * v2[0], v1[1] * v2[1], v1[2] * v2[2])
|
* @param[out] d vec3 = (v1[0] * v2[0], v1[1] * v2[1], v1[2] * v2[2])
|
||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
void
|
void
|
||||||
@@ -48,8 +48,8 @@ glm_vec_mulv(vec3 a, vec3 b, vec3 d) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief fill a vector with specified value
|
* @brief fill a vector with specified value
|
||||||
*
|
*
|
||||||
* @param val value
|
* @param[in] val value
|
||||||
* @param d dest
|
* @param[out] d dest
|
||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
void
|
void
|
||||||
@@ -60,8 +60,8 @@ glm_vec_broadcast(float val, vec3 d) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief check if vector is equal to value (without epsilon)
|
* @brief check if vector is equal to value (without epsilon)
|
||||||
*
|
*
|
||||||
* @param v vector
|
* @param[in] v vector
|
||||||
* @param val value
|
* @param[in] val value
|
||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
bool
|
bool
|
||||||
@@ -72,8 +72,8 @@ glm_vec_eq(vec3 v, float val) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief check if vector is equal to value (with epsilon)
|
* @brief check if vector is equal to value (with epsilon)
|
||||||
*
|
*
|
||||||
* @param v vector
|
* @param[in] v vector
|
||||||
* @param val value
|
* @param[in] val value
|
||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
bool
|
bool
|
||||||
@@ -86,7 +86,7 @@ glm_vec_eq_eps(vec4 v, float val) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief check if vectors members are equal (without epsilon)
|
* @brief check if vectors members are equal (without epsilon)
|
||||||
*
|
*
|
||||||
* @param v vector
|
* @param[in] v vector
|
||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
bool
|
bool
|
||||||
@@ -97,8 +97,8 @@ glm_vec_eq_all(vec3 v) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief check if vector is equal to another (without epsilon)
|
* @brief check if vector is equal to another (without epsilon)
|
||||||
*
|
*
|
||||||
* @param v1 vector
|
* @param[in] v1 vector
|
||||||
* @param v2 vector
|
* @param[in] v2 vector
|
||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
bool
|
bool
|
||||||
@@ -111,8 +111,8 @@ glm_vec_eqv(vec3 v1, vec3 v2) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief check if vector is equal to another (with epsilon)
|
* @brief check if vector is equal to another (with epsilon)
|
||||||
*
|
*
|
||||||
* @param v1 vector
|
* @param[in] v1 vector
|
||||||
* @param v2 vector
|
* @param[in] v2 vector
|
||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
bool
|
bool
|
||||||
@@ -125,7 +125,7 @@ glm_vec_eqv_eps(vec3 v1, vec3 v2) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief max value of vector
|
* @brief max value of vector
|
||||||
*
|
*
|
||||||
* @param v vector
|
* @param[in] v vector
|
||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
float
|
float
|
||||||
@@ -144,7 +144,7 @@ glm_vec_max(vec3 v) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief min value of vector
|
* @brief min value of vector
|
||||||
*
|
*
|
||||||
* @param v vector
|
* @param[in] v vector
|
||||||
*/
|
*/
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
float
|
float
|
||||||
|
|||||||
Reference in New Issue
Block a user