mirror of
https://github.com/TangentFoxy/lume.git
synced 2026-03-14 04:36:51 -06:00
Changed lume.round() such that 0 results in 0 rather than -0
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user