cmake-3.25.1-tutorial-source/Step11/MathFunctions/MathFunctions.cxx
zhangyazhou 8a5b8b3292 init
2022-12-11 21:34:46 +08:00

20 lines
231 B
C++

#include "MathFunctions.h"
#include <cmath>
#ifdef USE_MYMATH
# include "mysqrt.h"
#endif
namespace mathfunctions {
double sqrt(double x)
{
#ifdef USE_MYMATH
return detail::mysqrt(x);
#else
return std::sqrt(x);
#endif
}
}