/** * 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); }
/** * @test * @dataProvider is_int_values */ public function is_int_values_test($i, $expected) { $this->assertEquals($expected, IN::isInt($i)); }
/** * @param string|int|float $value * * @return bool */ function check_is_integer($value) { return \Enimiste\Math\VO\IntegerNumber::isInt($value); }