mirror of
https://github.com/edubart/otclient.git
synced 2025-04-30 01:29:21 +02:00

* Split game module into game and game_interface * Move core_lib to corelib * Move miniwindow to corelib * Introduce init.lua script for initializing the client, giving much more flexibility * OTClient is no longer Application derived and is much simpler
8 lines
199 B
Lua
8 lines
199 B
Lua
function math.round(num, idp)
|
|
local mult = 10^(idp or 0)
|
|
if num >= 0 then
|
|
return math.floor(num * mult + 0.5) / mult
|
|
else
|
|
return math.ceil(num * mult - 0.5) / mult
|
|
end
|
|
end |