diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-20 09:43:51 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-20 09:43:51 +0200 |
commit | a04533f96433c8dd03b14a31d1f39f929c6dc366 (patch) | |
tree | bd01a7d645c12bd9ccf782054d5ba0ee1c5877e0 | |
parent | 4a645abd518918e34fb1d8ed3c291e19dc438dd9 (diff) | |
parent | 50fb0220ca96983337d21ab4264911daff3fe412 (diff) |
Merge pull request #66138 from aaronfranke/axis-count
Define AXIS_COUNT in all vector math types
-rw-r--r-- | core/math/vector2i.h | 2 | ||||
-rw-r--r-- | core/math/vector3i.h | 2 | ||||
-rw-r--r-- | core/math/vector4.h | 2 | ||||
-rw-r--r-- | core/math/vector4i.h | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/core/math/vector2i.h b/core/math/vector2i.h index 0245900a3b..e131bdea94 100644 --- a/core/math/vector2i.h +++ b/core/math/vector2i.h @@ -38,6 +38,8 @@ class String; struct Vector2; struct _NO_DISCARD_ Vector2i { + static const int AXIS_COUNT = 2; + enum Axis { AXIS_X, AXIS_Y, diff --git a/core/math/vector3i.h b/core/math/vector3i.h index 825ce40318..c6d03cd031 100644 --- a/core/math/vector3i.h +++ b/core/math/vector3i.h @@ -38,6 +38,8 @@ class String; struct Vector3; struct _NO_DISCARD_ Vector3i { + static const int AXIS_COUNT = 3; + enum Axis { AXIS_X, AXIS_Y, diff --git a/core/math/vector4.h b/core/math/vector4.h index f964264108..d89f3ddb05 100644 --- a/core/math/vector4.h +++ b/core/math/vector4.h @@ -37,6 +37,8 @@ #include "core/string/ustring.h" struct _NO_DISCARD_ Vector4 { + static const int AXIS_COUNT = 4; + enum Axis { AXIS_X, AXIS_Y, diff --git a/core/math/vector4i.h b/core/math/vector4i.h index d08e40d754..fdf33b9569 100644 --- a/core/math/vector4i.h +++ b/core/math/vector4i.h @@ -38,6 +38,8 @@ class String; struct Vector4; struct _NO_DISCARD_ Vector4i { + static const int AXIS_COUNT = 4; + enum Axis { AXIS_X, AXIS_Y, |