From 3faeb5628a31bf530a6e2de74dba7293129c7508 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sat, 3 Jul 2021 07:29:46 +0100 Subject: [PATCH] Fix `Rectangle::Contains` bounds check --- Source/engine/rectangle.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/engine/rectangle.hpp b/Source/engine/rectangle.hpp index 1d0756492..0dcc5b312 100644 --- a/Source/engine/rectangle.hpp +++ b/Source/engine/rectangle.hpp @@ -12,9 +12,9 @@ struct Rectangle { constexpr bool Contains(Point point) const { return point.x >= this->position.x - && point.x <= (this->position.x + this->size.width) + && point.x < (this->position.x + this->size.width) && point.y >= this->position.y - && point.y <= (this->position.y + this->size.height); + && point.y < (this->position.y + this->size.height); } };