[Cake] Choosing a tin to work on
g_amanakis at yahoo.com
Wed Apr 12 09:45:14 EDT 2017
>The last value less than or equal to zero will always win as best_tin.
>If all tdiff values are positive then best_time will end up as the lowest value however.
I agree with xnoreq. The algorithm as it is will not always return the least overdue tin. It returns either the lowest positive tdiff (if all tdiff values are positive), or the lowest negative one (if not all tdiff values are positive). This could be accomplished just with "if (tdiff<=best_time)" as xnoreq pointed out.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cake