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

public round ( float $value, string $rule, array $params = [] ) : float
$value float
$rule string
$params array
Результат float
Пример #1
0
 /**
  * @param int    $roundValue
  * @param string $mode
  * @return $this
  * @throws \JBZoo\SimpleTypes\Exception
  */
 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;
 }