diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2022-08-14 21:48:13 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2022-09-04 23:03:36 -0500 |
commit | 817ae9566723fd28be9dc5bb199001dc50ca6b54 (patch) | |
tree | 71b8b0c4a5b5c133415d66bb8c96e99ccf253b06 /core | |
parent | e7a0a97c0bc5d86644e62d537503e3b05313a01c (diff) |
Replace AABB has_no_volume with has_volume
Also replace has_no_surface with has_surface
Diffstat (limited to 'core')
-rw-r--r-- | core/math/aabb.h | 8 | ||||
-rw-r--r-- | core/variant/variant_call.cpp | 4 |
2 files changed, 6 insertions, 6 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; } diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 8f15a62f79..52e1a7b59c 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1938,8 +1938,8 @@ static void _register_variant_builtin_methods() { bind_method(AABB, abs, sarray(), varray()); bind_method(AABB, get_center, sarray(), varray()); bind_method(AABB, get_volume, sarray(), varray()); - bind_method(AABB, has_no_volume, sarray(), varray()); - bind_method(AABB, has_no_surface, sarray(), varray()); + bind_method(AABB, has_volume, sarray(), varray()); + bind_method(AABB, has_surface, sarray(), varray()); bind_method(AABB, has_point, sarray("point"), varray()); bind_method(AABB, is_equal_approx, sarray("aabb"), varray()); bind_method(AABB, intersects, sarray("with"), varray()); |