diff --git a/glm/core/func_common.inl b/glm/core/func_common.inl index 34246047..3a340e30 100644 --- a/glm/core/func_common.inl +++ b/glm/core/func_common.inl @@ -803,6 +803,7 @@ namespace detail smoothstep(edge0.w, edge1.w, x.w)); } + // TODO: Not working on MinGW... template GLM_FUNC_QUALIFIER bool isnan(genType const & x) { @@ -814,12 +815,12 @@ namespace detail # if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) return _isnan(x) != 0; # else - return std::isnan(x) != 0; + return std::isnan(x); # endif # elif(GLM_COMPILER & GLM_COMPILER_INTEL) return isnan(x) != 0; # else - return std::isnan(x) != 0; + return std::isnan(x); # endif } @@ -871,12 +872,12 @@ namespace detail # if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) return _isinf(x) != 0; # else - return std::isinf(x) != 0; + return std::isinf(x); # endif # elif(GLM_COMPILER & GLM_COMPILER_INTEL) return isinf(x) != 0; # else - return std::isinf(x) != 0; + return std::isinf(x); # endif } diff --git a/glm/gtx/integer.inl b/glm/gtx/integer.inl index 14e6afa9..547064f6 100644 --- a/glm/gtx/integer.inl +++ b/glm/gtx/integer.inl @@ -71,6 +71,7 @@ namespace _detail }//namespace _detail // Henry Gordon Dietz: http://aggregate.org/MAGIC/ +/* GLM_FUNC_QUALIFIER unsigned int floor_log2(unsigned int x) { x |= (x >> 1); @@ -79,9 +80,9 @@ namespace _detail x |= (x >> 8); x |= (x >> 16); - return(_detail::ones32(x) - 1); + return _detail::ones32(x) >> 1; } - +*/ // mod GLM_FUNC_QUALIFIER int mod(int x, int y) { diff --git a/test/core/core_func_common.cpp b/test/core/core_func_common.cpp index 1a525144..c278786c 100644 --- a/test/core/core_func_common.cpp +++ b/test/core/core_func_common.cpp @@ -371,7 +371,7 @@ int test_isnan() Error += true == glm::any(glm::isnan(glm::vec3(0.0f/Zero_f))) ? 0 : 1; Error += true == glm::any(glm::isnan(glm::vec4(0.0f/Zero_f))) ? 0 : 1; } - + return Error; } diff --git a/test/gtx/gtx_integer.cpp b/test/gtx/gtx_integer.cpp index c155523f..2749e711 100644 --- a/test/gtx/gtx_integer.cpp +++ b/test/gtx/gtx_integer.cpp @@ -11,7 +11,7 @@ #include #include #include - +/* int test_floor_log2() { int Error = 0; @@ -27,7 +27,7 @@ int test_floor_log2() return Error; } - +*/ int test_log2() { int Error = 0; @@ -65,7 +65,7 @@ int main() int Error = 0; Error += test_nlz(); - Error += test_floor_log2(); +// Error += test_floor_log2(); Error += test_log2(); return Error;