public static function equalWithin($a, $b, $delta)
    {
        if (is_infinite($a) xor is_infinite($b)) {
            return false;
        }

        if (is_nan($a) || is_nan($b) || is_nan($delta)) {
            return false;
        }

        return abs($a - $b) <= $delta;
    }
public static function equalWithin($a, $b, $delta)
    {
        if (is_infinite($a) xor is_infinite($b)) {
            return false;
        }

        if (is_nan($a) || is_nan($b) || is_nan($delta)) {
            return false;
        }

        return abs($a - $b) <= $delta;
    }
public static function equalWithin ( $ a , $ b , $ delta ) { if ( is_infinite ( $ a ) xor is_infinite ( $ b ) ) { return false ; } if ( is_nan ( $ a ) || is_nan ( $ b ) || is_nan ( $ delta ) ) { return false ; } return abs ( $ a - $ b ) <= $ delta ; }
Are two numbers equal within given delta.

@param int|float $a
@param int|float $b
@param int|float $delta

@return bool
Are two numbers equal within given delta .