I have two simple while loops in my program that I feel ought to be math equations, but I\'m struggling to convert them:
float a = someValue; int b = someOtherVa
c = (int)((a - (b / 2)) / b + 1); a -= c * b;
Test case at http://pastebin.com/m1034e639