Browse Source

Fix `Rectangle::Contains` bounds check

pull/2292/head
Gleb Mazovetskiy 5 years ago
parent
commit
3faeb5628a
  1. 4
      Source/engine/rectangle.hpp

4
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);
}
};

Loading…
Cancel
Save