Hi everyone,
I have been using two loops to generate generate variables one of them going up from 0 - 360 and the other going in the opposite direction from 360 - 0. The code I have been using for this looks like this:
b = 0 + bSpeed;
if (b > 360) {
b = 359 - bSpeed;
}
b2 = 360 - bSpeed;
if (b2 < 0) {
b2 = 1 + bSpeed;
}
Is there a simpler way to do this?