diff options
Diffstat (limited to 'src/utils/point.h')
-rw-r--r-- | src/utils/point.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/point.h b/src/utils/point.h index 4402aa09..ccd3d2c6 100644 --- a/src/utils/point.h +++ b/src/utils/point.h @@ -75,8 +75,8 @@ class Rectangle bool contains(const Point &p) const { - return (p.x - x) < w && - (p.y - y) < h; + return (p.x >= x && p.x <= x + w && + p.y >= y && p.y <= y + h); } bool intersects(const Rectangle &r) const |