mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Fixed round function
This commit is contained in:
parent
e42e112469
commit
91b8ae9c6e
@ -225,7 +225,9 @@ namespace glm
|
||||
{
|
||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'round' only accept floating-point inputs");
|
||||
|
||||
return genType(int(x + genType(0.5)));
|
||||
if(x < 0)
|
||||
return genType(int(x - genType(0.5)));
|
||||
return genType(int(x + genType(0.5)));
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
|
Loading…
Reference in New Issue
Block a user