set precision in lua code example
Example 1: 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
Example 2: Lua numbers
num = 50 -- All numbers are doubles.
local number = 15.57
local number2 = 15.23
print(math.floor(number + 0.5)) --16
print(math.floor(number2 + 0.5)) --15
num = 50 -- All numbers are doubles.