Elements used in the Balls and Things games for the RETRO.
Dependents: RETRO_BallsAndPaddle RETRO_BallAndHoles
Vector.h
- Committer:
- maxint
- Date:
- 2015-02-25
- Revision:
- 2:74bc9b16fb88
- Parent:
- 0:3d0db4e183ee
File content as of revision 2:74bc9b16fb88:
#pragma once #include "mbed.h" class Vector { public: float x; float y; Vector(); Vector(float fX, float fY); void set(float fX, 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); Vector getNormal(); Vector getNormalized(); void bounce(Vector vBounce); };