summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-11-06 00:57:53 +0100
committerGitHub <noreply@github.com>2021-11-06 00:57:53 +0100
commit7538c052158071e68054b6e6e0d5a2e9df8ee4f2 (patch)
tree6c9bce6e37357254d6fb3b5f23beb02be22bc3bd /core/math
parent70c82d9d3d8bce1510d3e910a03627567d2c5741 (diff)
parentdc11e73bf0bb2e24a2eed25b63a932d91fddfe4e (diff)
Merge pull request #54616 from briansemrau/aabb-area-to-volume
Diffstat (limited to 'core/math')
-rw-r--r--core/math/aabb.cpp2
-rw-r--r--core/math/aabb.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/core/math/aabb.cpp b/core/math/aabb.cpp
index 51a1309f0e..f3e78c0080 100644
--- a/core/math/aabb.cpp
+++ b/core/math/aabb.cpp
@@ -33,7 +33,7 @@
#include "core/string/print_string.h"
#include "core/variant/variant.h"
-real_t AABB::get_area() const {
+real_t AABB::get_volume() const {
return size.x * size.y * size.z;
}
diff --git a/core/math/aabb.h b/core/math/aabb.h
index c458e61475..02ce2501a0 100644
--- a/core/math/aabb.h
+++ b/core/math/aabb.h
@@ -46,8 +46,8 @@ public:
Vector3 position;
Vector3 size;
- real_t get_area() const; /// get area
- _FORCE_INLINE_ bool has_no_area() const {
+ real_t get_volume() const;
+ _FORCE_INLINE_ bool has_no_volume() const {
return (size.x <= 0 || size.y <= 0 || size.z <= 0);
}