mirror of
https://github.com/openharmony/third_party_cmake.git
synced 2026-07-21 08:15:27 -04:00
c8bc56b0c6
Signed-off-by: w00657280 <wuyuechang3@huawei.com>
21 lines
276 B
C++
21 lines
276 B
C++
|
|
#include "MathFunctions.h"
|
|
|
|
#include <cmath>
|
|
|
|
#ifdef USE_MYMATH
|
|
# include "mysqrt.h"
|
|
#endif
|
|
|
|
namespace mathfunctions {
|
|
double sqrt(double x)
|
|
{
|
|
// which square root function should we use?
|
|
#ifdef USE_MYMATH
|
|
return detail::mysqrt(x);
|
|
#else
|
|
return std::sqrt(x);
|
|
#endif
|
|
}
|
|
}
|