Level H Engine
Classes | Functions
Vec2.h File Reference
#include "math.h"
Include dependency graph for Vec2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Vec2
 Contains the Vec2 structure with functions and overloaded operators. More...
 

Functions

Vec2 operator- (Vec2 vecIn)
 Overloads the - operator allowing a Vec2 to be inverted. More...
 
Vec2 operator- (Vec2 vecInA, Vec2 vecInB)
 Overloads the - operator allowing Vec2's to be subtracted from each other. More...
 
Vec2 operator+ (Vec2 vecInA, Vec2 vecInB)
 Overloads the + operator. More...
 
Vec2 operator/ (Vec2 vecInA, float scalar)
 Overloads the / operator allowing a Vec2 to be divided by a scalar. More...
 
Vec2 operator* (Vec2 vecInA, float scalar)
 Overloads the * operator allowing a Vec2 to be multiplied by a scalar. More...
 
Vec2 operator* (Vec2 vecInA, Vec2 vecInB)
 Overloads the * operator allowing a Vec2 to be multiplied by another Vec2. More...
 

Function Documentation

◆ operator*() [1/2]

Vec2 operator* ( Vec2  vecInA,
float  scalar 
)
inline

Overloads the * operator allowing a Vec2 to be multiplied by a scalar.

Parameters
vecInAOne of the input Vec2's.
scalarThe scalar to multiply by.
Returns
The new vector.

◆ operator*() [2/2]

Vec2 operator* ( Vec2  vecInA,
Vec2  vecInB 
)
inline

Overloads the * operator allowing a Vec2 to be multiplied by another Vec2.

Parameters
vecInAOne of the input Vec2's.
vecInBOne of the input Vec2's.
Returns
The new vector.

◆ operator+()

Vec2 operator+ ( Vec2  vecInA,
Vec2  vecInB 
)
inline

Overloads the + operator.

Parameters
vecInAOne of the input Vec2's.
vecInBOne of the input Vec2's.
Returns
The new vector.

◆ operator-() [1/2]

Vec2 operator- ( Vec2  vecIn)
inline

Overloads the - operator allowing a Vec2 to be inverted.

Parameters
vecInThe input Vec2.
Returns
The new vector.

◆ operator-() [2/2]

Vec2 operator- ( Vec2  vecInA,
Vec2  vecInB 
)
inline

Overloads the - operator allowing Vec2's to be subtracted from each other.

Parameters
vecInAOne of the input Vec2's.
vecInBOne of the input Vec2's.
Returns
The new vector.

◆ operator/()

Vec2 operator/ ( Vec2  vecInA,
float  scalar 
)
inline

Overloads the / operator allowing a Vec2 to be divided by a scalar.

Parameters
vecInAOne of the input Vec2's.
scalarThe scalar to divide by.
Returns
The new vector.