function BigDecimal::one
Returns a BigDecimal representing one, with a scale of zero.
@psalm-pure
2 calls to BigDecimal::one()
- BigDecimal::power in vendor/
brick/ math/ src/ BigDecimal.php - Returns this number exponentiated to the given value.
- BigDecimal::toScale in vendor/
brick/ math/ src/ BigDecimal.php - Converts this number to a BigDecimal with the given scale, using rounding if necessary.
File
-
vendor/
brick/ math/ src/ BigDecimal.php, line 101
Class
- BigDecimal
- Immutable, arbitrary-precision signed decimal numbers.
Namespace
Brick\MathCode
public static function one() : BigDecimal {
/**
* @psalm-suppress ImpureStaticVariable
* @var BigDecimal|null $one
*/
static $one;
if ($one === null) {
$one = new BigDecimal('1');
}
return $one;
}