diff --git a/src/ImageSharp/Common/Helpers/TolerantMath.cs b/src/ImageSharp/Common/Helpers/TolerantMath.cs
index 5347efcc0..bef7eb161 100644
--- a/src/ImageSharp/Common/Helpers/TolerantMath.cs
+++ b/src/ImageSharp/Common/Helpers/TolerantMath.cs
@@ -16,6 +16,13 @@ namespace SixLabors.ImageSharp
private readonly double negEpsilon;
+ ///
+ /// A read-only default instance for using 1e-8 as epsilon.
+ /// It is a field so it can be passed as an 'in' parameter.
+ /// Does not necessarily fit all use cases!
+ ///
+ public static readonly TolerantMath Default = new TolerantMath(1e-8);
+
public TolerantMath(double epsilon)
{
DebugGuard.MustBeGreaterThan(epsilon, 0, nameof(epsilon));
@@ -24,8 +31,6 @@ namespace SixLabors.ImageSharp
this.negEpsilon = -epsilon;
}
- public static TolerantMath Default { get; } = new TolerantMath(1e-8);
-
///
/// == 0
///
diff --git a/tests/ImageSharp.Tests/TestUtilities/Attributes/ImageDataAttributeBase.cs b/tests/ImageSharp.Tests/TestUtilities/Attributes/ImageDataAttributeBase.cs
index ec3254921..6107154d0 100644
--- a/tests/ImageSharp.Tests/TestUtilities/Attributes/ImageDataAttributeBase.cs
+++ b/tests/ImageSharp.Tests/TestUtilities/Attributes/ImageDataAttributeBase.cs
@@ -61,7 +61,7 @@ namespace SixLabors.ImageSharp.Tests
addedRows = memberItems.Select(x => x as object[]);
if (addedRows.Any(x => x == null))
{
- throw new ArgumentException($"Property {this.MemberName} on {this.MemberType ?? testMethod.DeclaringType} yielded an item that is not an object[]");
+ addedRows = memberItems.Select(x => new[] { x });
}
}
}