mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 22:05:38 +00:00
Common/Rectangle: Fix off-by-one error in Intersects()
This commit is contained in:
parent
77a60f0c5f
commit
9fd95c3e21
|
@ -128,7 +128,7 @@ struct Rectangle
|
|||
/// Tests for intersection between two rectangles.
|
||||
constexpr bool Intersects(const Rectangle& rhs) const
|
||||
{
|
||||
return !(left > rhs.right || rhs.left > right || top > rhs.bottom || rhs.top > bottom);
|
||||
return !(left >= rhs.right || rhs.left >= right || top >= rhs.bottom || rhs.top >= bottom);
|
||||
}
|
||||
|
||||
/// Tests whether the specified point is contained in the rectangle.
|
||||
|
|
Loading…
Reference in a new issue