/** * This method returns whether the operand is a negative number. * * @access public * @static * @param IRatio\Type $x the object to be evaluated * @return IBool\Type whether the operand is a negative * number */ public static function isNegative(IRatio\Type $x) : IBool\Type { $a = IInt32\Module::isNegative($x->numerator())->unbox(); $b = IInt32\Module::isNegative($x->denominator())->unbox(); return IBool\Type::box(($a || $b) && $a != $b); }