parseManager/test2.lua
2019-01-07 10:30:22 -05:00

6 lines
154 B
Lua

function round(num, numDecimalPlaces)
local mult = 10^(numDecimalPlaces or 0)
return math.floor(num * mult + 0.5) / mult
end
print(round(123456.345,2))