22 #ifndef TITANIC_FPOINT_H 23 #define TITANIC_FPOINT_H 25 #include "common/rect.h" 37 FPoint(
float x,
float y) : _x(x), _y(y) {}
40 bool operator==(
const FPoint &p)
const {
return _x == p._x && _y == p._y; }
41 bool operator!=(
const FPoint &p)
const {
return _x != p._x || _y != p._y; }
42 FPoint operator+(
const FPoint &delta)
const {
return FPoint(_x + delta._x, _y + delta._y); }
43 FPoint operator-(
const FPoint &delta)
const {
return FPoint(_x - delta._x, _y - delta._y); }
45 void operator+=(
const FPoint &delta) {
50 void operator-=(
const FPoint &delta) {
int16 x
Definition: rect.h:46
int16 y
Definition: rect.h:47