cmake-3.25.1-tutorial-source/Complete/MathFunctions/MathFunctions.cxx

20 lines
231 B
C++
Raw Permalink Normal View History

2022-12-11 21:34:46 +08:00
#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
}
}