title: sin and cos are slow, is there an alternatve?
body: <p>My game needs to move by a certain angle. To do this I get the vector of the angle via sin and cos. Unfortunately sin and cos are my bottleneck. I'm sure I do not need this much precision. Is there an alternative to a C sin &amp; cos and look-up table that is decently precise but very fast?</p>
  
  <p>I had found this:</p>
  
  <pre><code>float Skeleton::fastSin( float x )
  {
      const float B = 4.0f/pi;
      const float C = -4.0f/(pi*pi);
  
      float y = B * x + C * x * abs(x);
  
      const float P = 0.225f;
  
      return P * (y * abs(y) - y) + y; 
  }
  </code></pre>
  
  <p>Unfortunately, this does not seem to work. I get significantly different behavior when I use this sin rather than C sin.</p>
  
  <p>Thanks</p>