lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



from  Zerobrane IDE with lua 5.3 and 5.2

a = 1.45555
b = a * 10^4
-- b = 14555.5
b = b + 0.5
-- b = 14556
c = math.floor(b)
-- c = 14555
c = b // 1
-- c = 14555

it there a way to force a good  float to int conversion ???

// voidptr