title: atan(x) gives me wrong values?
body: <p>I got this function in my code:</p>
  
  <pre><code>-(void)printAngle
  {
      int width = p2_t.x-cp1_t.x;
      int height = p2_t.y-cp1_t.y;
      if (width != 0) {
          CCLOG(@"%i * %i", width, height);
          CCLOG(@"%f", (float)atan(height/width)*(180/M_PI));
      }
  }
  </code></pre>
  
  <p>Heres a snippet from the output:</p>
  
  <pre><code>2011-12-06 20:46:52.074 x[12392:c503] 24 * 13
  2011-12-06 20:46:52.074 x[12392:c503] 0.000000
  2011-12-06 20:46:52.108 x[12392:c503] 25 * 15
  2011-12-06 20:46:52.108 x[12392:c503] 0.000000
  </code></pre>
  
  <p>That means that arctan(13/24) in degrees is 0. Which is not correct. So why am i getting 0? Is it something with types im doing wrong?</p>
  
  <p>It gets some angles correct:</p>
  
  <pre><code>2011-12-06 20:51:11.956 x[12436:c503] 12 * 129
  2011-12-06 20:51:11.957 x[12436:c503] 84.289404
  2011-12-06 20:51:11.989 x[12436:c503] 10 * 132
  2011-12-06 20:51:11.990 x[12436:c503] 85.601292
  </code></pre>