Skip to content

Commit dcbd69b

Browse files
Replace last PointF
1 parent efb96db commit dcbd69b

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/ImageSharp.Drawing/Shapes/PolygonClipper/BoundsF.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ public bool Intersects(BoundsF bounds)
8686
public PathF AsPath()
8787
=> new(4)
8888
{
89-
new PointF(this.Left, this.Top),
90-
new PointF(this.Right, this.Top),
91-
new PointF(this.Right, this.Bottom),
92-
new PointF(this.Left, this.Bottom)
89+
new Vector2(this.Left, this.Top),
90+
new Vector2(this.Right, this.Top),
91+
new Vector2(this.Right, this.Bottom),
92+
new Vector2(this.Left, this.Bottom)
9393
};
9494
}
9595
}

src/ImageSharp.Drawing/Shapes/PolygonClipper/ClipperUtils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ namespace SixLabors.ImageSharp.Drawing.Shapes.PolygonClipper
1010
internal static class ClipperUtils
1111
{
1212
public const float DefaultArcTolerance = .25F;
13+
14+
// TODO: review tolerence.
1315
public const float FloatingPointTolerance = 1e-4F;
1416
public const float DefaultMinimumEdgeLength = .1F;
1517

@@ -117,8 +119,6 @@ public static float DotProduct(Vector2 pt1, Vector2 pt2, Vector2 pt3)
117119

118120
[MethodImpl(MethodImplOptions.AggressiveInlining)]
119121
public static bool IsAlmostZero(float value)
120-
121-
// TODO: review tolerence.
122122
=> MathF.Abs(value) <= FloatingPointTolerance;
123123

124124
[MethodImpl(MethodImplOptions.AggressiveInlining)]

0 commit comments

Comments
 (0)