Elements used in the Balls and Things games for the RETRO.
Dependents: RETRO_BallsAndPaddle RETRO_BallAndHoles
Diff: Vector.h
- Revision:
- 0:3d0db4e183ee
- Child:
- 2:74bc9b16fb88
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Vector.h Fri Feb 06 09:51:06 2015 +0000 @@ -0,0 +1,22 @@ +#pragma once +#include "mbed.h" + +class Vector +{ + public: + float x; + float y; + + Vector(); + Vector(float fX, float fY); + void set(float dX, float fY); + void set(int nX, int nY); + float getSize(); + bool isLeft(); + bool isRight(); + bool isUp(); + bool isDown(); + void add(float fAdd); + void add(Vector vAdd); + void multiply(Vector vMult); +};