Skip to content

Commit

Permalink
Merge pull request #66138 from aaronfranke/axis-count
Browse files Browse the repository at this point in the history
Define AXIS_COUNT in all vector math types
  • Loading branch information
akien-mga committed Sep 20, 2022
2 parents 4a645ab + 50fb022 commit a04533f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/math/vector2i.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class String;
struct Vector2;

struct _NO_DISCARD_ Vector2i {
static const int AXIS_COUNT = 2;

enum Axis {
AXIS_X,
AXIS_Y,
Expand Down
2 changes: 2 additions & 0 deletions core/math/vector3i.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class String;
struct Vector3;

struct _NO_DISCARD_ Vector3i {
static const int AXIS_COUNT = 3;

enum Axis {
AXIS_X,
AXIS_Y,
Expand Down
2 changes: 2 additions & 0 deletions core/math/vector4.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions core/math/vector4i.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class String;
struct Vector4;

struct _NO_DISCARD_ Vector4i {
static const int AXIS_COUNT = 4;

enum Axis {
AXIS_X,
AXIS_Y,
Expand Down

0 comments on commit a04533f

Please sign in to comment.