Fixed build
This commit is contained in:
@@ -7,12 +7,19 @@
|
||||
// File : glm/gtx/ulp.inl
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmath>
|
||||
#include <cfloat>
|
||||
|
||||
#if(GLM_COMPILER & GLM_COMPILER_VC)
|
||||
# include <cfloat>
|
||||
# define GLM_NEXT_AFTER _nextafterf
|
||||
# if(GLM_MODEL == GLM_MODEL_32)
|
||||
# define GLM_NEXT_AFTER_FLT(x, toward) (float)_nextafter(x, float(toward))
|
||||
# else
|
||||
# define GLM_NEXT_AFTER_FLT(x, toward) _nextafterf(x, toward)
|
||||
# endif
|
||||
# define GLM_NEXT_AFTER_DBL(x, toward) _nextafter(x, toward)
|
||||
#else
|
||||
# include <cmath>
|
||||
# define GLM_NEXT_AFTER nextafterf
|
||||
# define GLM_NEXT_AFTER_FLT(x, toward) nextafterf(x, toward)
|
||||
# define GLM_NEXT_AFTER_DBL(x, toward) nextafter(x, toward)
|
||||
#endif
|
||||
|
||||
namespace glm{
|
||||
@@ -21,12 +28,12 @@ namespace ulp
|
||||
{
|
||||
GLM_FUNC_QUALIFIER float next_float(float const & x)
|
||||
{
|
||||
return GLM_NEXT_AFTER(x, std::numeric_limits<float>::max());
|
||||
return GLM_NEXT_AFTER_FLT(x, std::numeric_limits<float>::max());
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER double next_float(double const & x)
|
||||
{
|
||||
return GLM_NEXT_AFTER(x, std::numeric_limits<double>::max());
|
||||
return GLM_NEXT_AFTER_DBL(x, std::numeric_limits<double>::max());
|
||||
}
|
||||
|
||||
template<typename T, template<typename> class vecType>
|
||||
@@ -40,12 +47,12 @@ namespace ulp
|
||||
|
||||
GLM_FUNC_QUALIFIER float prev_float(float const & x)
|
||||
{
|
||||
return GLM_NEXT_AFTER(x, std::numeric_limits<float>::min());
|
||||
return GLM_NEXT_AFTER_FLT(x, std::numeric_limits<float>::min());
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER double prev_float(double const & x)
|
||||
{
|
||||
return GLM_NEXT_AFTER(x, std::numeric_limits<double>::min());
|
||||
return GLM_NEXT_AFTER_DBL(x, std::numeric_limits<double>::min());
|
||||
}
|
||||
|
||||
template<typename T, template<typename> class vecType>
|
||||
|
||||
Reference in New Issue
Block a user