MathFunctions.cxx 276 B

1234567891011121314151617181920
  1. #include "MathFunctions.h"
  2. #include <cmath>
  3. #ifdef USE_MYMATH
  4. # include "mysqrt.h"
  5. #endif
  6. namespace mathfunctions {
  7. double sqrt(double x)
  8. {
  9. // which square root function should we use?
  10. #ifdef USE_MYMATH
  11. return detail::mysqrt(x);
  12. #else
  13. return std::sqrt(x);
  14. #endif
  15. }
  16. }