Jamie Slowgrove - AI Assignment 1
Line of Sight & A* path-finding
 All Classes Namespaces Files Functions Variables
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  Vec2
 Creates a Vec2 structure with functions Creates a Vec2 structure with overloaded operators to create a new variable type for use as a 2D vector. More...
 

Functions

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

Function Documentation

Vec2 operator* ( Vec2  a,
float  b 
)
inline

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

Parameters
Vec2One of the input Vec2's
floatThe scalar to multiply by
Vec2 operator+ ( Vec2  a,
Vec2  b 
)
inline

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

Parameters
Vec2One of the input Vec2's
Vec2One of the input Vec2's
Vec2 operator- ( Vec2  a)
inline

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

Parameters
Vec2The input Vec2
Vec2 operator- ( Vec2  a,
Vec2  b 
)
inline

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

Parameters
Vec2One of the input Vec2's
Vec2One of the input Vec2's
Vec2 operator/ ( Vec2  a,
float  b 
)
inline

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

Parameters
Vec2One of the input Vec2's
floatThe scalar to divide by