From 6bff74e85667303f42b173af42cff67064ed1c6b Mon Sep 17 00:00:00 2001 From: rxi Date: Tue, 12 May 2015 20:30:05 +0100 Subject: [PATCH] Changed lume.round() such that 0 results in 0 rather than -0 --- lume.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lume.lua b/lume.lua index 4a37cf5..a2e5cc6 100644 --- a/lume.lua +++ b/lume.lua @@ -78,7 +78,7 @@ end function lume.round(x, increment) 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