Files
OpenNest/Source/OpenNest.Core/Tolerance.cs
2016-05-16 22:09:19 -04:00

15 lines
294 B
C#

using System;
namespace OpenNest
{
public static class Tolerance
{
public const double Epsilon = 0.00001;
public static bool IsEqualTo(this double a, double b, double tolerance = Epsilon)
{
return Math.Abs(b - a) <= tolerance;
}
}
}