summaryrefslogtreecommitdiff
path: root/core/math/aabb.h
diff options
context:
space:
mode:
authorAnilforextra <anilforextra@gmail.com>2021-09-21 00:33:52 +0545
committerAnilforextra <anilforextra@gmail.com>2021-09-21 21:14:17 +0545
commit90908cd67d3f44ba70cc4b7b32f024ce508cc0ee (patch)
tree4c3f64aa550e6dc763b9776dded65560b67db2cc /core/math/aabb.h
parent87de2e7c4a38b1258d9a554c7f50cdbd8ac825fa (diff)
Add Get Center Method for Rect2/Rect2i and AABB.
Diffstat (limited to 'core/math/aabb.h')
-rw-r--r--core/math/aabb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/math/aabb.h b/core/math/aabb.h
index e16246902a..97d92fbe37 100644
--- a/core/math/aabb.h
+++ b/core/math/aabb.h
@@ -118,6 +118,10 @@ public:
return position + size;
}
+ _FORCE_INLINE_ Vector3 get_center() const {
+ return position + (size * 0.5);
+ }
+
operator String() const;
_FORCE_INLINE_ AABB() {}