many changes :P
This commit is contained in:
24
geo/Point2.h
Normal file
24
geo/Point2.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef POINT2_H
|
||||
#define POINT2_H
|
||||
|
||||
/**
|
||||
* 2D Point
|
||||
*/
|
||||
struct Point2 {
|
||||
|
||||
float x;
|
||||
float y;
|
||||
|
||||
/** ctor */
|
||||
Point2() : x(0), y(0) {;}
|
||||
|
||||
/** ctor */
|
||||
Point2(const float x, const float y) : x(x), y(y) {;}
|
||||
|
||||
Point2 operator + (const Point2& o) const {return Point2(x+o.x, y+o.y);}
|
||||
|
||||
Point2 operator - (const Point2& o) const {return Point2(x-o.x, y-o.y);}
|
||||
|
||||
};
|
||||
|
||||
#endif // POINT2_H
|
||||
Reference in New Issue
Block a user