1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
|
.. default-domain:: C
vec2 extra
==========
Header: cglm/vec2-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 vec2.h in the future some of
these functions ma be moved to vec2 header.
Table of contents (click to go):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Functions:
1. :c:func:`glm_vec2_fill`
#. :c:func:`glm_vec2_eq`
#. :c:func:`glm_vec2_eq_eps`
#. :c:func:`glm_vec2_eq_all`
#. :c:func:`glm_vec2_eqv`
#. :c:func:`glm_vec2_eqv_eps`
#. :c:func:`glm_vec2_max`
#. :c:func:`glm_vec2_min`
#. :c:func:`glm_vec2_isnan`
#. :c:func:`glm_vec2_isinf`
#. :c:func:`glm_vec2_isvalid`
#. :c:func:`glm_vec2_sign`
#. :c:func:`glm_vec2_abs`
#. :c:func:`glm_vec2_fract`
#. :c:func:`glm_vec2_floor`
#. :c:func:`glm_vec2_sqrt`
Functions documentation
~~~~~~~~~~~~~~~~~~~~~~~
.. c:function:: void glm_vec2_fill(vec2 v, float val)
fill a vector with specified value
Parameters:
| *[in,out]* **dest** destination
| *[in]* **val** value
.. c:function:: bool glm_vec2_eq(vec2 v, float val)
check if vector is equal to value (without epsilon)
Parameters:
| *[in]* **v** vector
| *[in]* **val** value
.. c:function:: bool glm_vec2_eq_eps(vec2 v, float val)
check if vector is equal to value (with epsilon)
Parameters:
| *[in]* **v** vector
| *[in]* **val** value
.. c:function:: bool glm_vec2_eq_all(vec2 v)
check if vectors members are equal (without epsilon)
Parameters:
| *[in]* **v** vector
.. c:function:: bool glm_vec2_eqv(vec2 v1, vec2 v2)
check if vector is equal to another (without epsilon) vector
Parameters:
| *[in]* **vec** vector 1
| *[in]* **vec** vector 2
.. c:function:: bool glm_vec2_eqv_eps(vec2 v1, vec2 v2)
check if vector is equal to another (with epsilon)
Parameters:
| *[in]* **v1** vector1
| *[in]* **v2** vector2
.. c:function:: float glm_vec2_max(vec2 v)
max value of vector
Parameters:
| *[in]* **v** vector
.. c:function:: float glm_vec2_min(vec2 v)
min value of vector
Parameters:
| *[in]* **v** vector
.. c:function:: bool glm_vec2_isnan(vec2 v)
| check if one of items is NaN (not a number)
| you should only use this in DEBUG mode or very critical asserts
Parameters:
| *[in]* **v** vector
.. c:function:: bool glm_vec2_isinf(vec2 v)
| check if one of items is INFINITY
| you should only use this in DEBUG mode or very critical asserts
Parameters:
| *[in]* **v** vector
.. c:function:: bool glm_vec2_isvalid(vec2 v)
| check if all items are valid number
| you should only use this in DEBUG mode or very critical asserts
Parameters:
| *[in]* **v** vector
.. c:function:: void glm_vec2_sign(vec2 v, vec2 dest)
get sign of 32 bit float as +1, -1, 0
Parameters:
| *[in]* **v** vector
| *[out]* **dest** sign vector (only keeps signs as -1, 0, -1)
.. c:function:: void glm_vec2_abs(vec2 v, vec2 dest)
absolute value of each vector item
Parameters:
| *[in]* **v** vector
| *[out]* **dest** destination vector
.. c:function:: void glm_vec2_fract(vec2 v, vec2 dest)
get fractional part of each vector item
Parameters:
| *[in]* **v** vector
| *[out]* **dest** destination vector
.. c:function:: void glm_vec2_floor(vec2 v, vec2 dest)
floor value of each vector item
Parameters:
| *[in]* **v** vector
| *[out]* **dest** destination vector
.. c:function:: void glm_vec2_sqrt(vec2 v, vec2 dest)
square root of each vector item
Parameters:
| *[in]* **v** vector
| *[out]* **dest** destination vector (sqrt(v))
|