title: Wrapping a number?
body: <p>I have this float which is a rotation angle.</p>
  
  <pre><code>Camera.roty += (float) diffx * 0.2;
  </code></pre>
  
  <p>where diff is the change in mouse position.</p>
  
  <p>In OpenGL it will wrap it if it exceeds 360 or is below 0, but how could I do this if I want to verify if the angle is between 0 and 180?</p>
  
  <p>Thanks</p>