diff --git a/tests/ImageSharp.Tests/Primitives/PointFTests.cs b/tests/ImageSharp.Tests/Primitives/PointFTests.cs index f78a18fc13..f02433d9a8 100644 --- a/tests/ImageSharp.Tests/Primitives/PointFTests.cs +++ b/tests/ImageSharp.Tests/Primitives/PointFTests.cs @@ -6,12 +6,16 @@ using System.Globalization; using System.Numerics; using System.Reflection; using System.Runtime.CompilerServices; +using SixLabors.ImageSharp.Tests; using Xunit; namespace SixLabors.Primitives.Tests { public class PointFTests { + private static readonly ApproximateFloatComparer ApproximateFloatComparer = + new ApproximateFloatComparer(1e-6f); + [Fact] public void CanReinterpretCastFromVector2() { @@ -120,7 +124,8 @@ namespace SixLabors.Primitives.Tests var pout = PointF.Transform(p, matrix); - Assert.Equal(new PointF(-2.82842732F, 21.2132034F), pout); + Assert.Equal(-2.82842732F, pout.X, ApproximateFloatComparer); + Assert.Equal(21.2132034F, pout.Y, ApproximateFloatComparer); } [Fact] @@ -207,4 +212,4 @@ namespace SixLabors.Primitives.Tests Assert.Equal(y, deconstructedY); } } -} \ No newline at end of file +}