Changed lume.round() such that 0 results in 0 rather than -0

This commit is contained in:
rxi 2015-05-12 20:30:05 +01:00
parent 037f5e3325
commit 6bff74e856

View File

@ -78,7 +78,7 @@ end
function lume.round(x, increment) function lume.round(x, increment)
if increment then return lume.round(x / increment) * increment end if increment then return lume.round(x / increment) * increment end
return x > 0 and math_floor(x + .5) or math_ceil(x - .5) return x >= 0 and math_floor(x + .5) or math_ceil(x - .5)
end end