4 lines
137 B
Lua
4 lines
137 B
Lua
|
function round(exact, quantum)
|
||
|
local quant,frac = math.modf(exact/quantum)
|
||
|
return quantum * (quant + (frac > 0.5 and 1 or 0))
|
||
|
end
|