function BigDecimal::zero
Returns a BigDecimal representing zero, with a scale of zero.
@psalm-pure
1 call to BigDecimal::zero()
- BigDecimal::stripTrailingZeros in vendor/
brick/ math/ src/ BigDecimal.php - Returns a copy of this BigDecimal with any trailing zeros removed from the fractional part.
File
-
vendor/
brick/ math/ src/ BigDecimal.php, line 81
Class
- BigDecimal
- Immutable, arbitrary-precision signed decimal numbers.
Namespace
Brick\MathCode
public static function zero() : BigDecimal {
/**
* @psalm-suppress ImpureStaticVariable
* @var BigDecimal|null $zero
*/
static $zero;
if ($zero === null) {
$zero = new BigDecimal('0');
}
return $zero;
}