22 C_Vec2(
float x,
float y) : x(x), y(y){}
29 C_Vec2(
int x,
int y) : x((float)x), y((float)y){}
78 vecOut.
x = vecInA.
x - vecInB.
x;
79 vecOut.
y = vecInA.
y - vecInB.
y;
92 vecOut.
x = vecInA.
x + vecInB.
x;
93 vecOut.
y = vecInA.
y + vecInB.
y;
106 vecOut.
x = vecInA.
x / scalar;
107 vecOut.
y = vecInA.
y / scalar;
120 vecOut.
x = vecInA.
x * scalar;
121 vecOut.
y = vecInA.
y * scalar;
134 vecOut.
x = vecInA.
x * vecInB.
x;
135 vecOut.
y = vecInA.
y * vecInB.
y;
C_Vec2 * operator-=(C_Vec2 vecIn)
Overloads the -= operator.
Definition: C_Vec2.h:48
C_Vec2(int x, int y)
Constructs the Vec2 setting the values to the input coordinates.
Definition: C_Vec2.h:29
C_Vec2 * operator+=(C_Vec2 vecIn)
Overloads the += operator.
Definition: C_Vec2.h:36
float y
Definition: C_Vec2.h:10
Contains the Vec2 structure with functions and overloaded operators.
Definition: C_Vec2.h:7
C_Vec2()
Constructs the Vec2 setting the values to 0,0.
Definition: C_Vec2.h:15
C_Vec2 operator/(C_Vec2 vecInA, float scalar)
Overloads the / operator allowing a Vec2 to be divided by a scalar.
Definition: C_Vec2.h:103
C_Vec2 operator*(C_Vec2 vecInA, float scalar)
Overloads the * operator allowing a Vec2 to be multiplied by a scalar.
Definition: C_Vec2.h:117
float x
Position variables.
Definition: C_Vec2.h:10
C_Vec2(float x, float y)
Constructs the Vec2 setting the values to the input coordinates.
Definition: C_Vec2.h:22
C_Vec2 operator+(C_Vec2 vecInA, C_Vec2 vecInB)
Overloads the + operator.
Definition: C_Vec2.h:89
C_Vec2 operator-(C_Vec2 vecIn)
Overloads the - operator allowing a Vec2 to be inverted.
Definition: C_Vec2.h:61