Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Classes | Functions
Vec2.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  JAM_Vec2
 Creates an Vec2 structure with functions. Creates an Vec2 structure with overloaded operators to create a new variable type for use as a 2D vector. More...
 

Functions

JAM_Vec2 operator- (JAM_Vec2 a)
 
JAM_Vec2 operator+ (JAM_Vec2 a, JAM_Vec2 b)
 
JAM_Vec2 operator- (JAM_Vec2 a, JAM_Vec2 b)
 
JAM_Vec2 operator/ (JAM_Vec2 a, float b)
 
JAM_Vec2 operator* (JAM_Vec2 a, float b)
 

Function Documentation

JAM_Vec2 operator* ( JAM_Vec2  a,
float  b 
)
inline

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

Parameters
aOne of the input Vec2's.
bthe scalar to multiply by.
Returns
The new vector.
JAM_Vec2 operator+ ( JAM_Vec2  a,
JAM_Vec2  b 
)
inline

Overloads the + operator. Overloads the + operator allowing Vec2's to be added to each other.

Parameters
aOne of the input Vec2's.
bOne of the input Vec2's.
Returns
The new vector.
JAM_Vec2 operator- ( JAM_Vec2  a)
inline

Overloads the - operator. Overloads the - operator allowing a Vec2 to be inverted.

Parameters
aThe input Vec2.
Returns
The new vector.
JAM_Vec2 operator- ( JAM_Vec2  a,
JAM_Vec2  b 
)
inline

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

Parameters
aOne of the input Vec2's.
bOne of the input Vec2's.
Returns
The new vector.
JAM_Vec2 operator/ ( JAM_Vec2  a,
float  b 
)
inline

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

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