diff --git a/3rdparty/astc/astc_weight_align.cpp b/3rdparty/astc/astc_weight_align.cpp index 39d1e94..789438f 100644 --- a/3rdparty/astc/astc_weight_align.cpp +++ b/3rdparty/astc/astc_weight_align.cpp @@ -37,6 +37,8 @@ */ /*----------------------------------------------------------------------------*/ +#define _USE_MATH_DEFINES // for M_PI on windows + #include #include "astc_codec_internals.h" diff --git a/3rdparty/astc/mathlib.cpp b/3rdparty/astc/mathlib.cpp index 3c41a0a..faaad3a 100644 --- a/3rdparty/astc/mathlib.cpp +++ b/3rdparty/astc/mathlib.cpp @@ -13,12 +13,21 @@ */ /*----------------------------------------------------------------------------*/ +#define _USE_MATH_DEFINES // for M_PI on windows + #include #include #include #include #include "mathlib.h" +#ifdef WIN32 + double cbrt(double n) + { + return n < 0 ? -pow(-n, 1.0 / 3.0) : pow(n, 1.0 / 3.0); + } +#endif + /************************** basic OpenCL functions **************************/