Skip to content

Commit 0d92bfc

Browse files
committed
docs and call api for _aabb2d_zero
1 parent 2374329 commit 0d92bfc

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

docs/source/aabb2d.rst

+8
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Macros:
2424
Functions:
2525

2626
1. :c:func:`glm_aabb2d_copy`
27+
#. :c:func:`glm_aabb2d_zero`
2728
#. :c:func:`glm_aabb2d_transform`
2829
#. :c:func:`glm_aabb2d_merge`
2930
#. :c:func:`glm_aabb2d_crop`
@@ -50,6 +51,13 @@ Functions documentation
5051
| *[in]* **aabb** bounding box
5152
| *[out]* **dest** destination
5253
54+
.. c:function:: void glm_aabb2d_zero(vec2 aabb[2])
55+
56+
| makes all members of [aabb] 0.0f (zero)
57+
58+
Parameters:
59+
| *[in, out]* **aabb** bounding box
60+
5361
.. c:function:: void glm_aabb2d_transform(vec2 aabb[2], mat3 m, vec2 dest[2])
5462
5563
| apply transform to Axis-Aligned Bounding Box

include/cglm/aabb2d.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
#define glm_aabb2d_size(aabb) glm_aabb2d_diag(aabb)
1717

1818
/*!
19-
* @brief copy all members of [aabb] to [dest]
19+
* @brief make [aabb] zero
2020
*
21-
* @param[in] aabb source
22-
* @param[out] dest destination
21+
* @param[in, out] aabb
2322
*/
2423
CGLM_INLINE
2524
void

src/aabb2d.c

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
/* DEPRECATED! use _diag */
1212
#define glmc_aabb2d_size(aabb) glmc_aabb2d_diag(aabb)
1313

14+
CGLM_EXPORT
15+
void
16+
glmc_aabb2d_zero(vec2 aabb[2]) {
17+
glm_aabb2d_zero(aabb);
18+
}
19+
1420
CGLM_EXPORT
1521
void
1622
glmc_aabb2d_copy(vec2 aabb[2], vec2 dest[2]) {

0 commit comments

Comments
 (0)