diff --git a/glm/gtx/fast_trigonometry.inl b/glm/gtx/fast_trigonometry.inl index 632be5d2..b22487d5 100644 --- a/glm/gtx/fast_trigonometry.inl +++ b/glm/gtx/fast_trigonometry.inl @@ -9,12 +9,10 @@ namespace glm { - template + template GLM_FUNC_QUALIFIER T wrapAngle(T const & angle) { - T result = angle - floor(angle * one_over_two_pi()) * two_pi(); - result = result > T(0) ? result : -result; - return result; + return abs(mod(angle, two_pi())); } VECTORIZE_VEC(wrapAngle)