lol


(I could have optimized that $iif to $iif(%b - $2 > 0,$2,%b), but it's too late to edit now, teehee)