title: What is the name of this common algorithm?
body: <p>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:</p>
  
  <p>I have a number n(260) between 0 and x(359).</p>
  
  <p>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</p>
  
  <p>It works the other way as well e.g. n minus 270 should equal 349</p>
  
  <p>Any ideas if the algorithm has a name?</p>