Skip to content

Commit

Permalink
Fixed intersection test of RectangleF that caused a normal issue on l…
Browse files Browse the repository at this point in the history
…eft and bottom side.
  • Loading branch information
NedLanon committed Feb 4, 2018
1 parent 3a29c5c commit db57ff2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Humper/Base/RectangleF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ public void Inflate(float horizontalAmount, float verticalAmount)
/// <returns><c>true</c> if other <see cref="RectangleF"/> intersects with this rectangle; <c>false</c> otherwise.</returns>
public bool Intersects(RectangleF value)
{
return value.Left < Right && Left < value.Right &&
value.Top < Bottom && Top < value.Bottom;
return value.Left <= Right && Left < value.Right &&
value.Top <= Bottom && Top < value.Bottom;
}


Expand All @@ -311,8 +311,8 @@ public bool Intersects(RectangleF value)
/// <param name="result"><c>true</c> if other <see cref="RectangleF"/> intersects with this rectangle; <c>false</c> otherwise. As an output parameter.</param>
public void Intersects(ref RectangleF value, out bool result)
{
result = value.Left < Right && Left < value.Right &&
value.Top < Bottom && Top < value.Bottom;
result = value.Left <= Right && Left < value.Right &&
value.Top <= Bottom && Top < value.Bottom;
}

/// <summary>
Expand Down

0 comments on commit db57ff2

Please sign in to comment.