46 lines
1.4 KiB
C
46 lines
1.4 KiB
C
|
#ifndef COORDINATES_H__
|
||
|
#define COORDINATES_H__
|
||
|
|
||
|
/* *******************************************************************
|
||
|
* Includes
|
||
|
* ******************************************************************/
|
||
|
|
||
|
#include <stdbool.h>
|
||
|
#include <stdint.h>
|
||
|
|
||
|
/* *******************************************************************
|
||
|
* Defines
|
||
|
* ******************************************************************/
|
||
|
|
||
|
/* *******************************************************************
|
||
|
* Global types definition
|
||
|
* ******************************************************************/
|
||
|
|
||
|
/* *******************************************************************
|
||
|
* Global variables declaration
|
||
|
* ******************************************************************/
|
||
|
|
||
|
/* *******************************************************************
|
||
|
* Global functions declaration
|
||
|
* ******************************************************************/
|
||
|
|
||
|
/* *******************************************************************
|
||
|
* Class definition
|
||
|
* ******************************************************************/
|
||
|
|
||
|
class Coordinates
|
||
|
{
|
||
|
public:
|
||
|
typedef uint16_t tPos;
|
||
|
explicit Coordinates(const tPos x, const tPos y);
|
||
|
Coordinates operator+(const Coordinates& c) const;
|
||
|
tPos getX(void) const;
|
||
|
tPos getY(void) const;
|
||
|
|
||
|
private:
|
||
|
tPos _x;
|
||
|
tPos _y;
|
||
|
};
|
||
|
|
||
|
#endif /* COORDINATES_H__ */
|