summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/point.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/point.h b/src/utils/point.h
index 4402aa09..988b6c5a 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