public static function ofUnscaledValue($value, int $scale = 0) : BigDecimal
    {
        if ($scale < 0) {
            throw new \InvalidArgumentException('The scale cannot be negative.');
        }

        return new BigDecimal((string) BigInteger::of($value), $scale);
    }
public static function ofUnscaledValue($value, int $scale = 0) : BigDecimal
    {
        if ($scale < 0) {
            throw new \InvalidArgumentException('The scale cannot be negative.');
        }

        return new BigDecimal((string) BigInteger::of($value), $scale);
    }
public static function ofUnscaledValue ( $ value , int $ scale = 0 ) : BigDecimal { if ( $ scale < 0 ) { throw new \ InvalidArgumentException ( 'The scale cannot be negative.' ) ; } return new BigDecimal ( ( string ) BigInteger :: of ( $ value ) , $ scale ) ; }
Creates a BigDecimal from an unscaled value and a scale.

Example: `(12345, 3)` will result in the BigDecimal `12.345`.

@param BigNumber|number|string $value The unscaled value. Must be convertible to a BigInteger.
@param int                     $scale The scale of the number, positive or zero.

@return BigDecimal

@throws \InvalidArgumentException If the scale is negative.
Creates a BigDecimal from an unscaled value and a scale .