public bool Equals(double first, double second)
        {
            if (FuzzyCompare.InSameBoundary(first, second, _marginOfError, _ulpTolerance, _boundaryScale) &&
                FuzzyCompare.AreEqual(first, second, _marginOfError, _ulpTolerance))
            {
                return(true);
            }

            return(false);
        }
Пример #2
0
        public bool Equals(FuzzyHashedDouble other)
        {
            if (_ulpTolerance == other._ulpTolerance &&
                _marginOfError == other._marginOfError &&
                _boundaryScale == other._boundaryScale &&
                FuzzyCompare.InSameBoundary(_value, other._value, _marginOfError, _ulpTolerance, _boundaryScale) &&
                FuzzyCompare.AreEqual(_value, other._value, _marginOfError, _ulpTolerance))
            {
                return(true);
            }

            return(false);
        }