Maxint R&D / RETRO_BallsAndThings

Dependents:   RETRO_BallsAndPaddle RETRO_BallAndHoles

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Vector.h Source File

Vector.h

00001 #pragma once
00002 #include "mbed.h"
00003 
00004 class Vector
00005 {
00006     public:
00007         float x;
00008         float y;
00009         
00010         Vector();
00011         Vector(float fX, float fY);
00012         void set(float fX, float fY);
00013         void set(int nX, int nY);
00014         float getSize();
00015         bool isLeft();
00016         bool isRight();
00017         bool isUp();
00018         bool isDown();
00019         void add(float fAdd);
00020         void add(Vector vAdd);
00021         void multiply(Vector vMult);
00022         Vector getNormal();
00023         Vector getNormalized();
00024         void bounce(Vector vBounce);
00025 };