4#include "foundation/DataTypes.h"
22 constexpr Int2() : X(0), Y(0)
26 constexpr Int2(
const int32 x,
const int32 y) : X(x), Y(y)
30 const static Int2 Zero;
31 const static Int2 One;
33 int32 *GetValuePointer()
43 return X == right.X && Y == right.Y;
51 return {X + right.X, Y + right.Y};
59 return {X - right.X, Y - right.Y};
67 return X < right.X && Y < right.Y;
75 return X > right.X && Y > right.Y;
83 return X <= right.X && Y <= right.Y;
91 return X >= right.X && Y >= right.Y;
121 return {X * right.X, Y * right.Y};
129 return {X * value, Y * value};
137 return {X / value, Y / value};
bool operator<(const Int2 &right) const
Checks if both components of this vector are less than those of another.
Definition Int2.h:65
Int2 operator*(int32 value) const
Multiplies both components of the vector by a scalar.
Definition Int2.h:127
Int2 operator-(const Int2 &right) const
Subtracts one Int2 vector from another.
Definition Int2.h:57
Int2 operator/(int32 value) const
Divides both components of the vector by a scalar.
Definition Int2.h:135
bool operator>(const Int2 &right) const
Checks if both components of this vector are greater than those of another.
Definition Int2.h:73
Int2 operator+=(const Int2 &right) const
Adds another Int2 vector to this one and returns the result.
Definition Int2.h:97
Int2 operator+(const Int2 &right) const
Adds two Int2 vectors.
Definition Int2.h:49
Int2 operator*(const Int2 &right) const
Multiplies two Int2 vectors component-wise.
Definition Int2.h:119
bool operator==(const Int2 &right) const
Compares two Int2 values for equality.
Definition Int2.h:41
Int2 operator-=(const Int2 &right) const
Subtracts another Int2 vector from this one and returns the result.
Definition Int2.h:108
bool operator<=(const Int2 &right) const
Checks if both components of this vector are less than or equal to those of another.
Definition Int2.h:81
bool operator>=(const Int2 &right) const
Checks if both components of this vector are greater than or equal to those of another.
Definition Int2.h:89