Chris Taylor / Mbed 2 deprecated RETRO-CityRally

Dependencies:   mbed

GameEngine/Point.h

Committer:
taylorza
Date:
2015-02-01
Revision:
1:1b8125937f28
Parent:
0:d85c449aca6d

File content as of revision 1:1b8125937f28:

#ifndef __POINT_H__
#define __POINT_H__
struct Point
{
    int16_t X;
    int16_t Y;
    
    Point() :
        X(0),
        Y(0)
    {
    }
    
    Point(int16_t x, int16_t y) :
        X(x),
        Y(y)
    {        
    }
    
    inline bool operator==(const Point &rhs)
    {
        return X == rhs.X && Y == rhs.Y;
    }
    
    inline bool operator!=(const Point &rhs)
    {
        return !(*this == rhs);
    }
};
#endif //__POINT_H__