title: How to get to an angle choosing the shortest rotation direction
body: <p>I have a character in my game that must rotate smoothly to get to a desired angle. Consider <code>angle</code> as the current angle and <code>touchAngle</code> as the desired angle which is always between 0 to 360. I want to add +1/-1 to current angle in every game update to get to the desired <code>touchAngle</code>. The problem is first it must chose direction and it must be between 0 to 360. this is my pseudo code:</p>
  
  <pre><code>int touchAngle;
  float angle;
  public void update()
  {
      if ((int)angle != touchAngle) angle += ???
  }
  </code></pre>