MathDefs.cpp 479 B

1234567891011121314151617181920212223242526
  1. // Copyright (c) 2008-2023 the Urho3D project
  2. // License: MIT
  3. #include "../Precompiled.h"
  4. #include "../Math/MathDefs.h"
  5. #include "../DebugNew.h"
  6. namespace Urho3D
  7. {
  8. void SinCos(float angle, float& sin, float& cos)
  9. {
  10. float angleRadians = angle * M_DEGTORAD;
  11. #if defined(HAVE_SINCOSF)
  12. sincosf(angleRadians, &sin, &cos);
  13. #elif defined(HAVE___SINCOSF)
  14. __sincosf(angleRadians, &sin, &cos);
  15. #else
  16. sin = sinf(angleRadians);
  17. cos = cosf(angleRadians);
  18. #endif
  19. }
  20. }