Call RectangleF.Intersects to resolve recursion bug

When both params `a` and `b` are of type `RectangleF` just calling `Shape.Intersects` creates a infinite recursion bug.
This commit is contained in:
Christopher Whitley
2024-05-16 23:08:33 -04:00
parent 4da8929311
commit 72e4490ab9
+1 -1
View File
@@ -42,7 +42,7 @@ namespace MonoGame.Extended
CircleF circleA when b is OrientedRectangle orientedRectangleB => Intersects(circleA, orientedRectangleB),
RectangleF rectangleA when b is CircleF circleB => Intersects(circleB, rectangleA),
RectangleF rectangleA when b is RectangleF rectangleB => Intersects(rectangleA, rectangleB),
RectangleF rectangleA when b is RectangleF rectangleB => rectangleA.Intersects(rectangleB),
RectangleF rectangleA when b is OrientedRectangle orientedRectangleB => Intersects(rectangleA, orientedRectangleB).Intersects,
OrientedRectangle orientedRectangleA when b is CircleF circleB => Intersects(circleB, orientedRectangleA),