Fixed isnan and isinf on Android with Clang, issue #54

This commit is contained in:
Christophe Riccio 2013-03-16 01:34:37 +01:00
parent 8ed5f541ff
commit 003c547e43
2 changed files with 14 additions and 26 deletions

View File

@ -805,7 +805,7 @@ namespace detail
# if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)) # if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL))
return _isnan(x) != 0; return _isnan(x) != 0;
# elif(GLM_COMPILER & GLM_COMPILER_GCC) # elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) # if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isnan(x) != 0; return _isnan(x) != 0;
# else # else
@ -862,7 +862,7 @@ namespace detail
# if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC)) # if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC))
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
# elif(GLM_COMPILER & GLM_COMPILER_GCC) # elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) # if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isinf(x) != 0; return _isinf(x) != 0;
# else # else
@ -874,21 +874,6 @@ namespace detail
# else # else
return std::isinf(x); return std::isinf(x);
# endif # endif
/*
# if(GLM_COMPILER & GLM_COMPILER_VC)
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
return _isinf(x) != 0;
# else
return std::isinf(x);
# endif
# elif(GLM_COMPILER & GLM_COMPILER_INTEL)
return isinf(x) != 0;
# else
return std::isinf(x);
# endif
*/
} }
template <typename T> template <typename T>

View File

@ -45,6 +45,9 @@ GLM 0.9.4.3: 2013-0X-XX
- Fixed GTX_polar_coordinates euclidean function, takes a vec2 instead of a vec3 - Fixed GTX_polar_coordinates euclidean function, takes a vec2 instead of a vec3
- Clarify the license applying on the manual - Clarify the license applying on the manual
- Added a docx copy of the manual - Added a docx copy of the manual
- Fixed GLM_GTX_matrix_interpolation
- Fixed isnan and isinf on Android with Clang
================================================================================ ================================================================================
GLM 0.9.4.2: 2013-02-14 GLM 0.9.4.2: 2013-02-14