function BigDecimal::withPointMovedLeft
Returns a copy of this BigDecimal with the decimal point moved $n places to the left.
1 call to BigDecimal::withPointMovedLeft()
- BigDecimal::withPointMovedRight in vendor/
brick/ math/ src/ BigDecimal.php - Returns a copy of this BigDecimal with the decimal point moved $n places to the right.
File
-
vendor/
brick/ math/ src/ BigDecimal.php, line 452
Class
- BigDecimal
- Immutable, arbitrary-precision signed decimal numbers.
Namespace
Brick\MathCode
public function withPointMovedLeft(int $n) : BigDecimal {
if ($n === 0) {
return $this;
}
if ($n < 0) {
return $this->withPointMovedRight(-$n);
}
return new BigDecimal($this->value, $this->scale + $n);
}