lua-users home
lua-l archive

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


2014-11-19 22:56 GMT+02:00 Andrew Starks <andrew.starks@trms.com>:

> Numbers also have a subtype, however there is no `number` library, and so
> the  `math.type` method is used, instead.

On systems that have `alias`, one can do this:

$ alias lua="lua -l mathx -e 'debug.setmetatable(0,{__index=math})' -i"
$ lua
Lua 5.3.0 (beta)  Copyright (C) 1994-2014 Lua.org, PUC-Rio
> math.pi:nearbyint()
3.0