summaryrefslogtreecommitdiff
path: root/core/math/aabb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/aabb.cpp')
-rw-r--r--core/math/aabb.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/math/aabb.cpp b/core/math/aabb.cpp
index a4eb1fe2a5..27da061274 100644
--- a/core/math/aabb.cpp
+++ b/core/math/aabb.cpp
@@ -69,6 +69,11 @@ void AABB::merge_with(const AABB &p_aabb) {
size = max - min;
}
+bool AABB::is_equal_approx(const AABB &p_aabb) const {
+
+ return position.is_equal_approx(p_aabb.position) && size.is_equal_approx(p_aabb.size);
+}
+
AABB AABB::intersection(const AABB &p_aabb) const {
Vector3 src_min = position;