src/Helpers/Number.php
static public function floatsAreEqual($f1, $f2, $maxDiff = 0.005)
    {
        return abs((float) $f2 - (float) $f1) < $maxDiff;
    }
static public function floatsAreEqual($f1, $f2, $maxDiff = 0.005)
    {
        return abs((float) $f2 - (float) $f1) < $maxDiff;
    }
static public function floatsAreEqual ( $ f1 , $ f2 , $ maxDiff = 0.005 ) { return abs ( ( float ) $ f2 - ( float ) $ f1 ) < $ maxDiff ; }
Helper method to do a float comparison.

@param float $f1
@param float $f2
@param float $maxDiff

@return bool
True if the the floats are "equal", i.e. do not differ more than the
specified maximum difference.
Helper method to do a float comparison .