diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-06 17:00:44 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-06 17:00:44 +0200 |
commit | 5062aafc2dd7a82d61fd9b2241f0de269643bdad (patch) | |
tree | 09933242cf79a3c45d828ebf797615fa2afb9b3d /core/math/aabb.h | |
parent | f40755383e59562c089fe5c7a2d6fe9bee07507c (diff) | |
parent | 7c2f0a82f0726d299e12a93ea78f9f718ae04919 (diff) |
Merge pull request #64417 from aaronfranke/has-space
Replace AABB/Rect2/Rect2i has_no_* methods with has_* methods
Diffstat (limited to 'core/math/aabb.h')
-rw-r--r-- | core/math/aabb.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/math/aabb.h b/core/math/aabb.h index e88ba33531..acf903eeba 100644 --- a/core/math/aabb.h +++ b/core/math/aabb.h @@ -47,12 +47,12 @@ struct _NO_DISCARD_ AABB { Vector3 size; real_t get_volume() const; - _FORCE_INLINE_ bool has_no_volume() const { - return (size.x <= 0 || size.y <= 0 || size.z <= 0); + _FORCE_INLINE_ bool has_volume() const { + return size.x > 0.0f && size.y > 0.0f && size.z > 0.0f; } - _FORCE_INLINE_ bool has_no_surface() const { - return (size.x <= 0 && size.y <= 0 && size.z <= 0); + _FORCE_INLINE_ bool has_surface() const { + return size.x > 0.0f || size.y > 0.0f || size.z > 0.0f; } const Vector3 &get_position() const { return position; } |