From 50fb0220ca96983337d21ab4264911daff3fe412 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Mon, 19 Sep 2022 17:50:35 -0500 Subject: [PATCH] Define AXIS_COUNT in all vector types --- core/math/vector2i.h | 2 ++ core/math/vector3i.h | 2 ++ core/math/vector4.h | 2 ++ core/math/vector4i.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/core/math/vector2i.h b/core/math/vector2i.h index 0245900a3b2..e131bdea944 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 825ce40318a..c6d03cd0317 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 f9642641081..d89f3ddb054 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 d08e40d754e..fdf33b95692 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,