24 Vec2() : x(0.0f), y(0.0f) {}
31 Vec2(
float x,
float y) : x(x), y(y) {}
38 Vec2(
int x,
int y) : x((float)x), y((float)y) {}
70 return float(sqrt((x*x) + (y*y)));
96 vecOut.
x = vecInA.
x - vecInB.
x;
97 vecOut.
y = vecInA.
y - vecInB.
y;
110 vecOut.
x = vecInA.
x + vecInB.
x;
111 vecOut.
y = vecInA.
y + vecInB.
y;
124 vecOut.
x = vecInA.
x / scalar;
125 vecOut.
y = vecInA.
y / scalar;
138 vecOut.
x = vecInA.
x * scalar;
139 vecOut.
y = vecInA.
y * scalar;
152 vecOut.
x = vecInA.
x * vecInB.
x;
153 vecOut.
y = vecInA.
y * vecInB.
y;
Vec2()
Constructs the Vec2 setting the values to 0,0.
Definition: Vec2.h:24
Vec2(float x, float y)
Constructs the Vec2 setting the values to the input coordinates.
Definition: Vec2.h:31
Vec2 * operator+=(Vec2 vecIn)
Overloads the += operator.
Definition: Vec2.h:45
Mat4 operator-(Mat4 mInA, float s)
Overloads the - operator allowing a Mat4 to be added to a scalar.
Definition: Mat4.h:216
float x
Position variables.
Definition: Vec2.h:19
Vec2 operator/(Vec2 vecInA, float scalar)
Overloads the / operator allowing a Vec2 to be divided by a scalar.
Definition: Vec2.h:121
Mat4 operator*(Mat4 mInA, float s)
Overloads the * operator allowing a Mat4 to be multiplied to a scalar.
Definition: Mat4.h:248
float getLength()
Returns the length of the Vec2.
Definition: Vec2.h:68
Mat4 operator+(Mat4 mIn, float s)
Overloads the + operator allowing a Mat4 to be added to a scalar.
Definition: Mat4.h:184
Contains the Vec2 structure with functions and overloaded operators.
Definition: Vec2.h:16
float y
Definition: Vec2.h:19
The namespace for all maths code.
Definition: Convert.cpp:5
Vec2 * operator-=(Vec2 vecIn)
Overloads the -= operator.
Definition: Vec2.h:57
Vec2(int x, int y)
Constructs the Vec2 setting the values to the input coordinates.
Definition: Vec2.h:38