From 817ae9566723fd28be9dc5bb199001dc50ca6b54 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sun, 14 Aug 2022 21:48:13 -0500 Subject: Replace AABB has_no_volume with has_volume Also replace has_no_surface with has_surface --- core/math/aabb.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/math') 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; } -- cgit v1.2.3