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

GetTolerance() публичный статический Метод

public static GetTolerance ( double experimental, double theoretical, ToleranceUnit type ) : double
experimental double
theoretical double
type ToleranceUnit
Результат double
        public static double GetTolerance(double experimental, double theoretical, ToleranceUnit type)
        {
            switch (type)
            {
                case ToleranceUnit.MMU:
                    return (experimental - theoretical)*1000.0;

                case ToleranceUnit.PPM:
                    return (experimental - theoretical)/theoretical*1e6;

                default:
                    return experimental - theoretical;
            }
        }