int y;
int x;
Offset delta(const Coord& right) const { Offset d = { y - right.y, x - right.x }; return d; }
- Coord operator +(const Offset& right) const { Coord c = { y + right.y, x - right.x}; return c; }
+ Coord operator +(const Offset& right) const { Coord c = { y + right.y, x + right.x}; return c; }
Coord operator -(const Offset& right) const { Coord c = { y - right.y, x - right.x}; return c; }
const Coord& operator +=(const Offset& right) { y += right.y; x += right.x; return *this;}
const Coord& operator -=(const Offset& right) { y -= right.y; x -= right.x; return *this;}
extern const Coord Nowhere;
extern const Offset North, Northeast, East, Southeast, South, Southwest, West, Northwest, Stationary;
+template<> inline Coord mysign<Coord>(Coord val) { Coord c = { mysign(val.y), mysign(val.x) }; return c; }
+template<> inline Offset mysign<Offset>(Offset val) { Offset o = { mysign(val.y), mysign(val.x) }; return o; }
#endif
/* coord.hh */