This commit is contained in:
duarm
2023-12-03 02:35:41 -03:00
parent c29f077bed
commit 44d103fa00
2 changed files with 4 additions and 4 deletions

View File

@@ -227,7 +227,7 @@ glm_aabb2d_aabb(vec2 aabb[2], vec2 other[2]) {
} }
/*! /*!
* @brief check if AABB intersects with sphere * @brief check if AABB intersects with a circle
* *
* Circle Representation in cglm: [center.x, center.y, radii] * Circle Representation in cglm: [center.x, center.y, radii]
* *

View File

@@ -207,7 +207,7 @@ glms_aabb2d_(aabb)(vec2s aabb[2], vec2s other[2]) {
} }
/*! /*!
* @brief check if AABB intersects with sphere * @brief check if AABB intersects with a circle
* *
* https://github.com/erich666/GraphicsGems/blob/master/gems/BoxSphere.c * https://github.com/erich666/GraphicsGems/blob/master/gems/BoxSphere.c
* Solid Box - Solid Sphere test. * Solid Box - Solid Sphere test.
@@ -217,11 +217,11 @@ glms_aabb2d_(aabb)(vec2s aabb[2], vec2s other[2]) {
*/ */
CGLM_INLINE CGLM_INLINE
bool bool
glms_aabb2d_(sphere)(vec2s aabb[2], vec4s s) { glms_aabb2d_(circle)(vec2s aabb[2], vec3s c) {
vec2 rawAabb[2]; vec2 rawAabb[2];
glms_vec2_(unpack)(rawAabb, aabb, 2); glms_vec2_(unpack)(rawAabb, aabb, 2);
return glm_aabb2d_circle(rawAabb, s.raw); return glm_aabb2d_circle(rawAabb, c.raw);
} }
/*! /*!