CSMSL.Tolerance.Within C# (CSharp) Метод

Within() публичный Метод

Indicates if the two values provided are within this tolerance
public Within ( double experimental, double theoretical ) : bool
experimental double The experimental value
theoretical double The theoretical value
Результат bool
        public bool Within(double experimental, double theoretical)
        {
            double tolerance = Math.Abs(GetTolerance(experimental, theoretical, Unit));
            double value = (Type == ToleranceType.PlusAndMinus) ? Value : Value/2;
            return tolerance <= value;
        }