Пример #1
0
 /**
  * @param $number
  *
  * @return string
  */
 private function roundDigit(Number $number)
 {
     if ($number->isCloserToNext()) {
         return bcadd((string) $number, $number->getIntegerRoundingMultiplier(), 0);
     }
     return bcadd((string) $number, '0', 0);
 }
Пример #2
0
 /**
  * @param $number
  *
  * @return string
  */
 private function roundDigit(Number $number)
 {
     if ($number->isCloserToNext()) {
         return $this->add($number->getIntegerPart(), $number->getIntegerRoundingMultiplier());
     }
     return $this->add($number->getIntegerPart(), '0');
 }