private bool CheckRoundedEquality(double value) { switch (RoundType) { case ScanRoundMode.Strict: return(Value1.IsNearlyEqual(Math.Round(value, significantDigits, MidpointRounding.AwayFromZero))); case ScanRoundMode.Normal: return(minValue < value && value < maxValue); case ScanRoundMode.Truncate: return((long)value == (long)Value1); default: throw new ArgumentOutOfRangeException(); } }