using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
publicclass Utility
{
publicstatic bool AlmostZero(float f)
{
return NearlyEqual(f, 0.0f);
}
publicstatic bool NearlyEqual(float A, float B)
{
if (A > B + Epsilon) return false;
if (A < B - Epsilon) return false;
return true;
}
publicstaticfloat Epsilon = 0.000001f;
}