SUPER Space invader : Turbo edition DX - VS GOD 1.0.0
A simple space invader ripoff
utils.cpp File Reference
#include "utils.h"
Include dependency graph for utils.cpp:

Go to the source code of this file.

Functions

bool areLinesColliding (unsigned start1, unsigned end1, unsigned start2, unsigned end2)
 tells if 2 lines are colliding in a 1 dimentionnal space More...
 
void applyTransformation (Position &pos, unsigned sizeFrom, unsigned sizeTo)
 change the size of a Position object More...
 

Function Documentation

◆ applyTransformation()

void applyTransformation ( Position pos,
unsigned  sizeFrom,
unsigned  sizeTo 
)

change the size of a Position object

Parameters
[in,out]pos: Position object
[in]sizeFromcurrent size of the objet
[in]sizeTo: new size of the object

Definition at line 8 of file utils.cpp.

◆ areLinesColliding()

bool areLinesColliding ( unsigned  start1,
unsigned  end1,
unsigned  start2,
unsigned  end2 
)

tells if 2 lines are colliding in a 1 dimentionnal space

Parameters
[in]start1: position of the first point of the first line
[in]end1posision of the last point of the first line
[in]start2: position of the first point of the seconde line
[in]end2posision of the last point of the second line
Returns
true if they are olliding, false elsewise

Definition at line 3 of file utils.cpp.