This is for the love2d engine. Works with the latest version. Look at my intro to software project for some examples on how to use this
4 lines
104 B
Plaintext
4 lines
104 B
Plaintext
function gui.round(num, idp)
|
|
local mult = 10^(idp or 0)
|
|
return math.floor(num * mult + 0.5) / mult
|
|
end |