title: Getting angle back from a sin/cos conversion
body: <p>I want to reverse a <code>sin</code>/<code>cos</code> operation to get back an angle, but I can't figure out what I should be doing.</p>
  
  <p>I have used <code>sin</code> and <code>cos</code> on an angle in radians to get the x/y vector as such:</p>
  
  <pre><code>double angle = 90.0 * M_PI / 180.0;  // 90 deg. to rad.
  double s_x = cos( angle );
  double s_y = sin( angle );
  </code></pre>
  
  <p>Given <code>s_x</code> and <code>s_y</code>, is it possible to get back the angle? I thought <code>atan2</code> was the function to use, but I'm not getting the expected results.</p>