Fireworks Engine  v2.0
Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping
fireworks::maths::vec2 Struct Reference

#include <vec2.h>

Public Member Functions

 vec2 ()
 
 vec2 (const float &x, const float &y)
 
vec2add (const vec2 &other)
 
vec2subtract (const vec2 &other)
 
vec2mutiply (const vec2 &other)
 
vec2divide (const vec2 &other)
 
bool operator== (const vec2 &other)
 
bool operator!= (const vec2 &other)
 
vec2operator+= (const vec2 &other)
 
vec2operator-= (const vec2 &other)
 
vec2operator*= (const vec2 &other)
 
vec2operator/= (const vec2 &other)
 

Public Attributes

float x
 
float y
 

Friends

vec2 operator+ (vec2 left, const vec2 &right)
 
vec2 operator- (vec2 left, const vec2 &right)
 
vec2 operator* (vec2 left, const vec2 &right)
 
vec2 operator/ (vec2 left, const vec2 &right)
 
std::ostream & operator<< (std::ostream &stream, const vec2 &vector)
 

Constructor & Destructor Documentation

◆ vec2() [1/2]

fireworks::maths::vec2::vec2 ( )

◆ vec2() [2/2]

fireworks::maths::vec2::vec2 ( const float &  x,
const float &  y 
)

Member Function Documentation

◆ add()

vec2 & fireworks::maths::vec2::add ( const vec2 other)

◆ divide()

vec2 & fireworks::maths::vec2::divide ( const vec2 other)

◆ mutiply()

vec2 & fireworks::maths::vec2::mutiply ( const vec2 other)

◆ operator!=()

bool fireworks::maths::vec2::operator!= ( const vec2 other)

◆ operator*=()

vec2 & fireworks::maths::vec2::operator*= ( const vec2 other)

◆ operator+=()

vec2 & fireworks::maths::vec2::operator+= ( const vec2 other)

◆ operator-=()

vec2 & fireworks::maths::vec2::operator-= ( const vec2 other)

◆ operator/=()

vec2 & fireworks::maths::vec2::operator/= ( const vec2 other)

◆ operator==()

bool fireworks::maths::vec2::operator== ( const vec2 other)

◆ subtract()

vec2 & fireworks::maths::vec2::subtract ( const vec2 other)

Friends And Related Function Documentation

◆ operator*

vec2 operator* ( vec2  left,
const vec2 right 
)
friend

◆ operator+

vec2 operator+ ( vec2  left,
const vec2 right 
)
friend

◆ operator-

vec2 operator- ( vec2  left,
const vec2 right 
)
friend

◆ operator/

vec2 operator/ ( vec2  left,
const vec2 right 
)
friend

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const vec2 vector 
)
friend

Member Data Documentation

◆ x

float fireworks::maths::vec2::x

◆ y

float fireworks::maths::vec2::y

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