getMessage(); } return (int) ($a == $b); } /** * GESTEP. * * Excel Function: * GESTEP(number[,step]) * * Returns 1 if number >= step; returns 0 (zero) otherwise * Use this function to filter a set of values. For example, by summing several GESTEP * functions you calculate the count of values that exceed a threshold. * * @param float $number the value to test against step * @param float $step The threshold value. If you omit a value for step, GESTEP uses zero. * * @return int|string (string in the event of an error) */ public static function GESTEP($number, $step = 0) { $number = Functions::flattenSingleValue($number); $step = Functions::flattenSingleValue($step); try { $number = EngineeringValidations::validateFloat($number); $step = EngineeringValidations::validateFloat($step); } catch (Exception $e) { return $e->getMessage(); } return (int) ($number >= $step); } }