diff options
Diffstat (limited to 'src/math')
-rw-r--r-- | src/math/intpoint.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/math/intpoint.h b/src/math/intpoint.h index 0f59af6..ebd9c5e 100644 --- a/src/math/intpoint.h +++ b/src/math/intpoint.h @@ -39,6 +39,16 @@ struct IntPoint int y; IntPoint(int aX = 0, int aY = 0) : x(aX), y(aY) {} + + inline bool operator==(const IntPoint& p) const + { + return x == p.x && y == p.y; + } + + inline bool operator!=(const IntPoint& p) const + { + return !operator==(p); + } }; |