4 lines
132 B
Lua
4 lines
132 B
Lua
|
function round(num, numDecimalPlaces)
|
||
|
local mult = 10^(numDecimalPlaces or 0)
|
||
|
return math.floor(num * mult + 0.5) / mult
|
||
|
end
|