mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Merge branch '0.9.5'
This commit is contained in:
commit
90acd7236d
@ -713,7 +713,9 @@ namespace detail
|
||||
std::numeric_limits<genType>::is_iec559,
|
||||
"'isnan' only accept floating-point inputs");
|
||||
|
||||
# if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL))
|
||||
# if(GLM_LANG & GLM_LANG_CXX11_FLAG)
|
||||
return std::isnan(x);
|
||||
# elif(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL))
|
||||
return _isnan(x) != 0;
|
||||
# elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))
|
||||
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L)
|
||||
@ -780,11 +782,11 @@ namespace detail
|
||||
GLM_FUNC_QUALIFIER bool isinf(
|
||||
genType const & x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genType>::is_iec559,
|
||||
"'isinf' only accept floating-point inputs");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'isinf' only accept floating-point inputs");
|
||||
|
||||
# if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC))
|
||||
# if(GLM_LANG & GLM_LANG_CXX11_FLAG)
|
||||
return std::isinf(x);
|
||||
# elif(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC))
|
||||
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
|
||||
# elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))
|
||||
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L)
|
||||
|
@ -204,7 +204,7 @@ namespace glm
|
||||
# elif((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
|
||||
return detail::nextafterf(x, FLT_MAX);
|
||||
# elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||
return _nextafterf(x, FLT_MAX);
|
||||
return __builtin_nextafterf(x, FLT_MAX);
|
||||
# else
|
||||
return nextafterf(x, FLT_MAX);
|
||||
# endif
|
||||
@ -217,6 +217,8 @@ namespace glm
|
||||
return std::nextafter(x, std::numeric_limits<double>::max());
|
||||
# elif((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
|
||||
return detail::nextafter(x, std::numeric_limits<double>::max());
|
||||
# elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||
return __builtin_nextafter(x, FLT_MAX);
|
||||
# else
|
||||
return nextafter(x, DBL_MAX);
|
||||
# endif
|
||||
@ -238,7 +240,7 @@ namespace glm
|
||||
# elif((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
|
||||
return detail::nextafterf(x, FLT_MIN);
|
||||
# elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||
return _nextafterf(x, FLT_MIN);
|
||||
return __builtin_nextafterf(x, FLT_MIN);
|
||||
# else
|
||||
return nextafterf(x, FLT_MIN);
|
||||
# endif
|
||||
@ -248,8 +250,10 @@ namespace glm
|
||||
{
|
||||
# if((GLM_LANG & GLM_LANG_CXX11_FLAG) && !(GLM_PLATFORM & GLM_PLATFORM_ANDROID))
|
||||
return std::nextafter(x, std::numeric_limits<double>::min());
|
||||
# elif((GLM_PLATFORM & GLM_PLATFORM_ANDROID) || (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
|
||||
# elif((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
|
||||
return _nextafter(x, DBL_MIN);
|
||||
# elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||
return __builtin_nextafter(x, DBL_MIN);
|
||||
# else
|
||||
return nextafter(x, DBL_MIN);
|
||||
# endif
|
||||
|
@ -7,6 +7,8 @@
|
||||
// File : glm/gtx/compatibility.inl
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <limits>
|
||||
|
||||
namespace glm
|
||||
{
|
||||
// isfinite
|
||||
@ -21,7 +23,7 @@ namespace glm
|
||||
# elif(GLM_COMPILER & GLM_COMPILER_GCC && GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||
return _isfinite(x) != 0;
|
||||
# else
|
||||
return isfinite(x) != 0;
|
||||
return x >= std::numeric_limits<genType>::min() && x <= std::numeric_limits<genType>::max();
|
||||
# endif
|
||||
}
|
||||
|
||||
|
@ -50,9 +50,11 @@ GLM 0.9.6.0: 2014-XX-XX
|
||||
================================================================================
|
||||
GLM 0.9.5.5: 2014-XX-XX
|
||||
--------------------------------------------------------------------------------
|
||||
- Fixed std::nextafter not supported with C++11 on Android #213
|
||||
- Fixed std::nextafter not supported with C++11 on Android #217
|
||||
- Fixed missing value_type for dual quaternion
|
||||
- Fixed return type of dual quaternion length
|
||||
- Fixed infinite loop in isfinite function with GCC #221
|
||||
- Rely on C++11 to implement isinf and isnan
|
||||
|
||||
================================================================================
|
||||
GLM 0.9.5.4: 2014-06-21
|
||||
|
Loading…
Reference in New Issue
Block a user