JBZoo\Utils\Vars::isNegative PHP Method

isNegative() public static method

Is the current value negative; less than zero.
public static isNegative ( integer $number ) : boolean
$number integer
return boolean
    public static function isNegative($number)
    {
        return $number < 0;
    }

Usage Example

Beispiel #1
0
 public function testIsNegative()
 {
     isTrue(Vars::isNegative(-1));
     isTrue(Vars::isNegative(-384));
     isFalse(Vars::isNegative(0));
     isFalse(Vars::isNegative(34));
 }