src/Float.php
public static function compare($float1, $float2)
    {
        if (!static::is($float1) || !static::is($float2)) {
            throw new \InvalidArgumentException("The \$float1 and \$float2 parameters must be of type float.");
        }

        return ($float1 - $float2);
    }
public static function compare($float1, $float2)
    {
        if (!static::is($float1) || !static::is($float2)) {
            throw new \InvalidArgumentException("The \$float1 and \$float2 parameters must be of type float.");
        }

        return ($float1 - $float2);
    }
public static function compare ( $ float1 , $ float2 ) { if ( ! static :: is ( $ float1 ) || ! static :: is ( $ float2 ) ) { throw new \ InvalidArgumentException ( "The \$float1 and \$float2 parameters must be of type float." ) ; } return ( $ float1 - $ float2 ) ; }
Compares two float values.

The returning value contains the actual value difference.

@param float $float1 The left operand.
@param float $float2 The right operand.

@return float Returns <0 if $float1<$float2, =0 if $float1 == $float2, >0 if $float1>$float2
@throws \InvalidArgumentException
Compares two float values .