Math.cpp 423 B

12345678910111213141516171819202122232425262728
  1. #include "math/Math.hpp"
  2. #include <math.h>
  3. float Core::Math::sin(float f) {
  4. return sinf(f);
  5. }
  6. float Core::Math::cos(float f) {
  7. return cosf(f);
  8. }
  9. float Core::Math::tan(float f) {
  10. return tanf(f);
  11. }
  12. void Core::Math::sinCos(float a, float& s, float& c) {
  13. #ifdef _GNU_SOURCE
  14. sincosf(a, &s, &c);
  15. #else
  16. s = sinf(a);
  17. c = cosf(a);
  18. #endif
  19. }
  20. float Core::Math::squareRoot(float f) {
  21. return sqrtf(f);
  22. }