Elements used in the Balls and Things games for the RETRO.

Dependents:   RETRO_BallsAndPaddle RETRO_BallAndHoles

Vector.h

Committer:
maxint
Date:
2015-02-06
Revision:
0:3d0db4e183ee
Child:
2:74bc9b16fb88

File content as of revision 0:3d0db4e183ee:

#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);
};