function BigInteger::minus
Returns the difference of this number and the given one.
Parameters
BigNumber|int|float|string $that The number to subtract. Must be convertible to a BigInteger.:
Throws
MathException If the number is not valid, or is not convertible to a BigInteger.
File
-
vendor/
brick/ math/ src/ BigInteger.php, line 388
Class
- BigInteger
- An arbitrary-size integer.
Namespace
Brick\MathCode
public function minus(BigNumber|int|float|string $that) : BigInteger {
$that = BigInteger::of($that);
if ($that->value === '0') {
return $this;
}
$value = Calculator::get()->sub($this->value, $that->value);
return new BigInteger($value);
}