Money\Money::round PHP Метод

round() публичный Метод

Rounds this Money to another scale
public round ( integer $scale ) : Money
$scale integer
Результат Money
    public function round($scale = 0)
    {
        if (!is_int($scale)) {
            throw new InvalidArgumentException('Scale is not an integer');
        }
        $add = '0.' . str_repeat('0', $scale) . '5';
        $newAmount = bcadd($this->amount, $add, $scale);
        return $this->newInstance($newAmount);
    }