mirror of
https://github.com/openharmony/third_party_cmake.git
synced 2026-07-21 16:25:22 -04:00
c8bc56b0c6
Signed-off-by: w00657280 <wuyuechang3@huawei.com>
20 lines
275 B
C++
20 lines
275 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
|
|
}
|
|
}
|