Fix off-by-one error in isQuadInBounds

This commit is contained in:
Leon Gebler 2021-03-23 17:21:42 +01:00
parent 877e19421b
commit def0e5c42e

View File

@ -242,8 +242,8 @@ namespace osu.Game.Rulesets.Osu.Edit
private (bool X, bool Y) isQuadInBounds(Quad quad)
{
bool xInBounds = (quad.TopLeft.X >= 0) && (quad.BottomRight.X < DrawWidth);
bool yInBounds = (quad.TopLeft.Y >= 0) && (quad.BottomRight.Y < DrawHeight);
bool xInBounds = (quad.TopLeft.X >= 0) && (quad.BottomRight.X <= DrawWidth);
bool yInBounds = (quad.TopLeft.Y >= 0) && (quad.BottomRight.Y <= DrawHeight);
return (xInBounds, yInBounds);
}