Files
OpenNest/OpenNest.Core/Math/Tolerance.cs
AJ Isaacs 1d9bcc63d2 chore: sort using directives
Auto-formatter reordering of using statements across the solution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 16:47:42 -04:00

19 lines
564 B
C#

namespace OpenNest.Math
{
public static class Tolerance
{
public const double Epsilon = 0.00001;
/// <summary>
/// Tolerance for chaining entity endpoints when building shapes from DXF imports.
/// Larger than Epsilon to handle floating-point gaps at entity junctions.
/// </summary>
public const double ChainTolerance = 0.0001;
public static bool IsEqualTo(this double a, double b, double tolerance = Epsilon)
{
return System.Math.Abs(b - a) <= tolerance;
}
}
}