src/BigFloat.php
public static function abs($float)
    {
        if (!static::is($float)) {
            throw new \InvalidArgumentException(
                "The \$float parameter must be of type float (or string representing a big float)."
            );
        }

        if (Float::is($float)) {
            return Float::abs($float);
        } else {
            return Str::replace($float, '-', '');
        }
    }
public static function abs($float)
    {
        if (!static::is($float)) {
            throw new \InvalidArgumentException(
                "The \$float parameter must be of type float (or string representing a big float)."
            );
        }

        if (Float::is($float)) {
            return Float::abs($float);
        } else {
            return Str::replace($float, '-', '');
        }
    }
public static function abs ( $ float ) { if ( ! static :: is ( $ float ) ) { throw new \ InvalidArgumentException ( "The \$float parameter must be of type float (or string representing a big float)." ) ; } if ( Float :: is ( $ float ) ) { return Float :: abs ( $ float ) ; } else { return Str :: replace ( $ float , '-' , '' ) ; } }
Gets the absolute value of the given float.

@param int|string $float The number to get the absolute value of.

@return int|string Returns the absolute value of the given float.
Gets the absolute value of the given float .