[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Subtype [From: [5.3] Converting a floating point number to integer.]
- From: Dirk Laurie <dirk.laurie@...>
- Date: Thu, 20 Nov 2014 12:28:07 +0200
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