Here's the problem - I think it's a very common one with a well documented answer, but I'm not sure what the name of it is to find the answer:
I have a number n(260) between 0 and x(359).
I want to add a value of 100 to n but instead of the result being 360 I want it to cycle back round to 0
It works the other way as well e.g. n minus 270 should equal 349
Any ideas if the algorithm has a name?