size -> diag, new sizev

This commit is contained in:
duarm
2024-02-23 13:53:25 -03:00
parent 7e6a463256
commit 131ac68ad3
4 changed files with 32 additions and 12 deletions

View File

@@ -17,6 +17,10 @@ convert it before and after calling a cglm aabb2d function.
Table of contents (click to go):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Macros:
1. :c:func:`glm_aabb2d_size`
Functions:
1. :c:func:`glm_aabb2d_copy`
@@ -26,7 +30,8 @@ Functions:
#. :c:func:`glm_aabb2d_crop_until`
#. :c:func:`glm_aabb2d_invalidate`
#. :c:func:`glm_aabb2d_isvalid`
#. :c:func:`glm_aabb2d_size`
#. :c:func:`glm_aabb2d_diag`
#. :c:func:`glm_aabb2d_sizev`
#. :c:func:`glm_aabb2d_radius`
#. :c:func:`glm_aabb2d_center`
#. :c:func:`glm_aabb2d_aabb`
@@ -111,9 +116,9 @@ Functions documentation
Returns:
returns true if aabb is valid otherwise false
.. c:function:: float glm_aabb2d_size(vec2 aabb[2])
.. c:function:: float glm_aabb2d_diag(vec2 aabb[2])
| distance between of min and max
| distance between min and max
Parameters:
| *[in]* **aabb** bounding box
@@ -121,6 +126,18 @@ Functions documentation
Returns:
distance between min - max
.. c:function:: void glm_aabb2d_sizev(vec2 aabb[2], vec2 dest)
| size vector of aabb
Parameters:
| *[in]* **aabb** bounding box
| *[out]* **dest** size vector
Returns:
size vector of aabb max - min
.. c:function:: float glm_aabb2d_radius(vec2 aabb[2])
| radius of sphere which surrounds AABB