Float to integer

How to convert float to integer so 4.858 moves to 5?

broken:



V = int(4.858)


If your wanting it to always round up then use, math.ceil(). Otherwhise use, math.Round().

In actual programming data type conversion it just drops the decimals. So if you want it like that you can use math.floor().

local vRounded = math.Round(V)