Actually now that I think about it, I think a while loop would do better, just incase you have really large additions that carry 2 or something...
1 2 3 4
|
while(angle3 >= 60){
angle2++; //short for "angle2 = angle2 + 1"
angle3 -= 60; //short for "angle3 = angle3 - 60"
}
|
A
while loop is basically the same thing as an
if statement but once it hits the end of the loop it returns to the to the test statement, if the test is still true then what's inside the {curly braces} get executed again, and this keeps going until the test statement returns false (or if it is false when the loop is first come across then none of the content is executed)
EDIT: btw the modulus operator,
%, gives you the remainder of a division, so for example
73 % 60
would give you 13, which is the value that should appear instead of 73 but it does not help you figure out how much to add on to the next number if there are very large carries.
Just use the looped tests and +/-.