From 2268a23bf3c1dade078663a68b5a1cd7470b7d56 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 31 Jan 2011 17:24:08 +0000 Subject: [PATCH] Fixed trunc implementation --- glm/core/func_common.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/core/func_common.inl b/glm/core/func_common.inl index c9e18cb8..c68cff46 100644 --- a/glm/core/func_common.inl +++ b/glm/core/func_common.inl @@ -189,7 +189,7 @@ namespace glm inline genType trunc(genType const & x) { GLM_STATIC_ASSERT(detail::type::is_float); - return floor(abs(x)); + return x < 0 ? -floor(-x) : floor(x);; } template