Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Public Member Functions | Public Attributes | List of all members
JAM_Vec2 Struct Reference

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...

#include <Vec2.h>

Collaboration diagram for JAM_Vec2:
Collaboration graph

Public Member Functions

 JAM_Vec2 ()
 
 JAM_Vec2 (float inputX, float inputY)
 
JAM_Vec2operator+= (JAM_Vec2 a)
 
JAM_Vec2operator-= (JAM_Vec2 a)
 

Public Attributes

float x
 
float y
 

Detailed Description

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.

Author
Jamie Slowgrove Reference ~ This is a modified version of my AI Assignment 1 Vec2 class.

Constructor & Destructor Documentation

JAM_Vec2::JAM_Vec2 ( )
inline

Constructs the Vec2. Constructs the Vec2 setting the values to 0,0.

JAM_Vec2::JAM_Vec2 ( float  inputX,
float  inputY 
)
inline

Constructs the Vec2. Constructs the Vec2 setting the values to the input coordinates.

Parameters
inputXThe inputed x position.
inputYThe inputed y position.

Member Function Documentation

JAM_Vec2* JAM_Vec2::operator+= ( JAM_Vec2  a)
inline

Overloads the += operator. Overloads the += operator allowing a Vec2 variable to use +=.

Parameters
aThe input Vec2.
Returns
The new vector.
JAM_Vec2* JAM_Vec2::operator-= ( JAM_Vec2  a)
inline

Overloads the -= operator. Overloads the -= operator allowing a Vec2 variable to use -=.

Parameters
aThe input Vec2.
Returns
The new vector.

Member Data Documentation

float JAM_Vec2::x
float JAM_Vec2::y

The documentation for this struct was generated from the following file: