Skip to content

Commit

Permalink
docs and call api for _aabb2d_zero
Browse files Browse the repository at this point in the history
  • Loading branch information
duarm committed Feb 23, 2024
1 parent 2374329 commit 0d92bfc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
8 changes: 8 additions & 0 deletions docs/source/aabb2d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Macros:
Functions:

1. :c:func:`glm_aabb2d_copy`
#. :c:func:`glm_aabb2d_zero`
#. :c:func:`glm_aabb2d_transform`
#. :c:func:`glm_aabb2d_merge`
#. :c:func:`glm_aabb2d_crop`
Expand All @@ -50,6 +51,13 @@ Functions documentation
| *[in]* **aabb** bounding box
| *[out]* **dest** destination
.. c:function:: void glm_aabb2d_zero(vec2 aabb[2])
| makes all members of [aabb] 0.0f (zero)
Parameters:
| *[in, out]* **aabb** bounding box
.. c:function:: void glm_aabb2d_transform(vec2 aabb[2], mat3 m, vec2 dest[2])
| apply transform to Axis-Aligned Bounding Box
Expand Down
5 changes: 2 additions & 3 deletions include/cglm/aabb2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
#define glm_aabb2d_size(aabb) glm_aabb2d_diag(aabb)

/*!
* @brief copy all members of [aabb] to [dest]
* @brief make [aabb] zero
*
* @param[in] aabb source
* @param[out] dest destination
* @param[in, out] aabb
*/
CGLM_INLINE
void
Expand Down
6 changes: 6 additions & 0 deletions src/aabb2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
/* DEPRECATED! use _diag */
#define glmc_aabb2d_size(aabb) glmc_aabb2d_diag(aabb)

CGLM_EXPORT
void
glmc_aabb2d_zero(vec2 aabb[2]) {
glm_aabb2d_zero(aabb);
}

CGLM_EXPORT
void
glmc_aabb2d_copy(vec2 aabb[2], vec2 dest[2]) {
Expand Down

0 comments on commit 0d92bfc

Please sign in to comment.