Fixed round function

master
Christophe Riccio ago%!(EXTRA string=14 years)
parent e42e112469
commit 91b8ae9c6e
  1. 2
      glm/core/func_common.inl

@ -225,6 +225,8 @@ namespace glm
{
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'round' only accept floating-point inputs");
if(x < 0)
return genType(int(x - genType(0.5)));
return genType(int(x + genType(0.5)));
}

Loading…
Cancel
Save