Advertisement
Kitomas

fx16_8.cpp

Dec 1st, 2023 (edited)
671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 17.91 KB | None | 0 0
  1. #include <utils/fx16_8.hpp>
  2.  
  3.  
  4. const fx16_8 fx_epsilon = 1.0/256; // = 1/256
  5. const fx16_8 fx_1third  = 1.0/3;   // = 1/3
  6. const fx16_8 fx_2thirds = 2.0/3;   // = 2/3
  7. const fx16_8 fx_half    = 1.0/2;   // = 1/2
  8.  
  9. const fx16_8 fx_sqrt2 = 1.4142135624; // = sqrt(2)
  10.  
  11. const fx16_8 fx_invpi = 1.0/3.1415926536; // = 1/pi
  12. const fx16_8 fx_pi4 = 0.7853981634; // = pi/4
  13. const fx16_8 fx_pi2 = 1.5707963268; // = pi/2
  14. const fx16_8 fx_pi  = 3.1415926536; // = pi
  15. const fx16_8 fx_2pi = 6.2831853072; // = pi*2
  16.  
  17. const fx16_8 fx_pi_180 = 3.1415926536/180;   // = pi/180
  18. const fx16_8 fx_180_pi = 180.0/3.1415926536; // = 180/pi
  19. const fx16_8 fx_invpi_180 = 1.0/(3.1415926536/180);   // = 1/(pi/180)
  20. const fx16_8 fx_inv180_pi = 1.0/(180.0/3.1415926536); // = 1/(180/pi)
  21.  
  22.  
  23.  
  24. const Sint16 _fx16_8_sin_table[1608] = { // pi2.v = 1608
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement