SHARE
TWEET

Fast atan Lookup

Whisket May 22nd, 2020 (edited) 1,488 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.     Taken from here;
  3.     https://stackoverflow.com/questions/42537957/fast-accurate-atan-arctan-approximation-algorithm
  4. */
  5. #define A 0.0776509570923569
  6. #define B -0.287434475393028
  7. #define C (M_PI_4 - A - B)
  8.  
  9. double FastArcTan(double x) {
  10.     double xx = x * x;
  11.     return ((A*xx + B)*xx + C)*x;
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top