lua-users home
lua-l archive

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


> Since you only have one numerical type, I think the only way (besides
> calling a registered routine of course) is to convert the number to text
> format (via the format routine), and parse it.

You can use:

function int(n)
  if n < 0 then return ceil(n)
  return floor(n)
end

(untested, but you get the idea)

-- 
http://sc3d.org/rrt/ | Si hoc legere scis nimium eruditionis habes.