rounding - lua - How to get decimals to round down on the half - Stack Overflow
I'm using this function to round currently: function round(val, decimal) if (decimal) then return math.floor( (val * 10^decimal) + 0.5) / (10^decimal) else return math.floor(val+0.5) ......