Fixed modf

This commit is contained in:
Christophe Riccio 2011-11-14 11:55:03 +00:00
parent 4010b8d234
commit 7f153a2b62
4 changed files with 9 additions and 22 deletions

View File

@ -242,6 +242,11 @@ namespace detail
}; \
}
GLM_DETAIL_IS_FLOAT(detail::thalf);
GLM_DETAIL_IS_FLOAT(float);
GLM_DETAIL_IS_FLOAT(double);
GLM_DETAIL_IS_FLOAT(long double);
//////////////////
// bool

View File

@ -217,9 +217,7 @@ namespace detail
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'modf' only accept floating-point inputs");
i = glm::floor(x);
return x - i;
return std::modf(x, &i);
}
template <typename valType>

View File

@ -34,15 +34,6 @@
namespace glm
{
namespace detail
{
GLM_DETAIL_IS_FLOAT(detail::thalf);
GLM_DETAIL_IS_FLOAT(float);
GLM_DETAIL_IS_FLOAT(double);
GLM_DETAIL_IS_FLOAT(long double);
}
//namespace detail
#ifdef GLM_USE_HALF_SCALAR
typedef detail::thalf lowp_float_t;
#else//GLM_USE_HALF_SCALAR

View File

@ -34,19 +34,12 @@ GLM is a header only library, there is nothing to build, just include it.
#include <glm/glm.hpp>
More informations in GLM manual:
http://glm.g-truc.net/glm-0.9.3.pdf
http://glm.g-truc.net/glm-0.9.2.pdf
================================================================================
GLM 0.9.3.0: 2011-XX-XX
GLM 0.9.2.8: 2011-12-XX
--------------------------------------------------------------------------------
- Improved doxygen documentation
- Promoted GLM_GTC_noise extension: simplex, perlin, periodic noise functions
- Promoted GLM_GTC_random extension: linear, gaussian and various random number
generation distribution.
- Added GLM_GTX_constants: provides usefull constants
- Added extension versioning
- Removed many unused namespaces
- Fixed half based type contructors
- Fixed modf implementation
================================================================================
GLM 0.9.2.7: 2011-10-24