Fixed trunc implementation

This commit is contained in:
Christophe Riccio 2011-01-31 17:24:08 +00:00
parent 1b6c73a82e
commit 2268a23bf3

View File

@ -189,7 +189,7 @@ namespace glm
inline genType trunc(genType const & x)
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float);
return floor(abs(x));
return x < 0 ? -floor(-x) : floor(x);;
}
template <typename valType>