diff options
author | Anilforextra <anilforextra@gmail.com> | 2021-09-21 00:33:52 +0545 |
---|---|---|
committer | Anilforextra <anilforextra@gmail.com> | 2021-09-21 21:14:17 +0545 |
commit | 90908cd67d3f44ba70cc4b7b32f024ce508cc0ee (patch) | |
tree | 4c3f64aa550e6dc763b9776dded65560b67db2cc /core/math/aabb.h | |
parent | 87de2e7c4a38b1258d9a554c7f50cdbd8ac825fa (diff) |
Add Get Center Method for Rect2/Rect2i and AABB.
Diffstat (limited to 'core/math/aabb.h')
-rw-r--r-- | core/math/aabb.h | 4 |
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() {} |