Lua round number

This article is tagged with: Lua round number and lua

lua round number

local number = 15.57
local number2 = 15.23
print(math.floor(number + 0.5)) --16
print(math.floor(number2 + 0.5)) --15

This article is tagged with: Lua round number and lua