Пример #1
0
 /**
  * @param string|int|float|\Enimiste\Math\VO\IntegerNumber $value
  *
  * @return \Enimiste\Math\VO\FloatNumber
  */
 function as_integer_number($value)
 {
     if ($value instanceof \Enimiste\Math\VO\IntegerNumber) {
         return $value;
     } elseif ($value instanceof \Enimiste\Math\VO\FloatNumber) {
         return new \Enimiste\Math\VO\IntegerNumber($value->__toString());
     } else {
         return new \Enimiste\Math\VO\IntegerNumber($value);
     }
 }