Exemplo n.º 1
0
 /**
  * Check if this number is less than the given value
  *
  * @param string|int|float|Number $other
  *
  * @param int                     $scale
  *
  * @return bool
  */
 public function lt($other, $scale = null)
 {
     if (!$other instanceof Number) {
         if (!is_numeric($other)) {
             return false;
         } elseif (IntegerNumber::isInt($other)) {
             $other = new IntegerNumber($other);
         } else {
             $other = new FloatNumber($other, is_null($scale) ? FloatNumber::PRECISION : $scale);
         }
     }
     return $this->_lt($other);
 }
Exemplo n.º 2
0
 /**
  * @test
  * @dataProvider is_int_values
  */
 public function is_int_values_test($i, $expected)
 {
     $this->assertEquals($expected, IN::isInt($i));
 }
Exemplo n.º 3
0
 /**
  * @param string|int|float $value
  *
  * @return bool
  */
 function check_is_integer($value)
 {
     return \Enimiste\Math\VO\IntegerNumber::isInt($value);
 }