not exactly what you're looking for but an alternative non the less.
You could have your 360 deg angles from 0 to 255 and do a bit operator to wrap it around.
your condition would look like this:
angle = (angle + 1) & 255
no if's or divisions.. once you hit 256, it auto wraps to 0. very fast.
You could have your 360 deg angles from 0 to 255 and do a bit operator to wrap it around.
your condition would look like this:
angle = (angle + 1) & 255
no if's or divisions.. once you hit 256, it auto wraps to 0. very fast.