public virtual bool IsApplicableTo(double value) { value = Math.Abs(value); double precision = DoubleHelper.GetPrecision(3, value); if (DoubleHelper.GreaterOrEqualWithPrecision(value, this.ApplicableRangeMinimum, precision)) { return(DoubleHelper.LessWithPrecision(value, this.ApplicableRangeMaximum, precision)); } return(false); }
public static bool GreaterOrEqualWithPrecision(this double value1, double value2) { return(DoubleHelper.GreaterOrEqualWithPrecision(value1, value2, 0.0001)); }