JBZoo\SimpleTypes\Type\Type::round PHP Method

round() public method

public round ( integer $roundValue = null, string $mode = Formatter::ROUND_CLASSIC )
$roundValue integer
$mode string
    public function round($roundValue = null, $mode = Formatter::ROUND_CLASSIC)
    {
        $oldValue = $this->_value;
        $newValue = $this->_formatter->round($this->_value, $this->_rule, array('roundValue' => $roundValue, 'roundType' => $mode));
        $this->log('Rounded (size=' . (int) $roundValue . '; type=' . $mode . ') "' . $oldValue . '" => "' . $newValue . '"');
        $this->_value = $newValue;
        return $this;
    }