Removed floor_log2, comment that isnan and isinf are not working on MinGW

This commit is contained in:
Christophe Riccio 2012-09-18 01:52:16 +02:00
parent c7812d44cf
commit c2eea6da26
4 changed files with 12 additions and 10 deletions

View File

@ -803,6 +803,7 @@ namespace detail
smoothstep(edge0.w, edge1.w, x.w));
}
// TODO: Not working on MinGW...
template <typename genType>
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
}

View File

@ -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)
{

View File

@ -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;
}

View File

@ -11,7 +11,7 @@
#include <glm/gtc/epsilon.hpp>
#include <glm/gtx/integer.hpp>
#include <cstdio>
/*
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;