RCS0056 - roslynator_max_line_length = 160

This commit is contained in:
RoosterDragon
2024-07-27 16:09:46 +01:00
committed by Matthias Mailänder
parent 9d5d2ab493
commit 0649f3dc32
129 changed files with 606 additions and 245 deletions

View File

@@ -66,7 +66,9 @@ namespace OpenRA.Primitives
public bool IntersectsWith(Rectangle rect)
{
var intersectsBoundingRect = BoundingRect.Left < rect.Right && BoundingRect.Right > rect.Left && BoundingRect.Top < rect.Bottom && BoundingRect.Bottom > rect.Top;
var intersectsBoundingRect =
BoundingRect.Left < rect.Right && BoundingRect.Right > rect.Left &&
BoundingRect.Top < rect.Bottom && BoundingRect.Bottom > rect.Top;
if (isRectangle)
return intersectsBoundingRect;
@@ -75,11 +77,13 @@ namespace OpenRA.Primitives
return false;
// Easy case 2: Rect and bounding box intersect in a cross shape
if ((rect.Left <= BoundingRect.Left && rect.Right >= BoundingRect.Right) || (rect.Top <= BoundingRect.Top && rect.Bottom >= BoundingRect.Bottom))
if ((rect.Left <= BoundingRect.Left && rect.Right >= BoundingRect.Right) ||
(rect.Top <= BoundingRect.Top && rect.Bottom >= BoundingRect.Bottom))
return true;
// Easy case 3: Corner of rect is inside the polygon
if (Vertices.PolygonContains(rect.TopLeft) || Vertices.PolygonContains(rect.TopRight) || Vertices.PolygonContains(rect.BottomLeft) || Vertices.PolygonContains(rect.BottomRight))
if (Vertices.PolygonContains(rect.TopLeft) || Vertices.PolygonContains(rect.TopRight) ||
Vertices.PolygonContains(rect.BottomLeft) || Vertices.PolygonContains(rect.BottomRight))
return true;
// Easy case 4: Polygon vertex is inside rect