lua-users home
lua-l archive

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


math.floor(number) or math.ceil(number) will do, depending on wether you
want to scale it down or up

-----Ursprüngliche Nachricht-----
Von: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] Im Auftrag von Walter Cruz
Gesendet: Dienstag, 23. August 2005 21:03
An: lua@bazar2.conectiva.com.br
Betreff: integer lua

HI. If i had a number like '2.545' in lua, how can I get only the
integer part (2)?

(Sorry for the totally newbie question)

[]'s
- Walter