Number class
Summary
Methods
__index(key)shared
Looks up the keys that are indexed on a number in the math library, so that its functions can be called as methods.
Methods
Looks up the keys that are indexed on a number in the math library, so that its functions can be called as methods. Throws an error if the math library has no such key.
local n = 12.7
print(n:floor()) -- 12, same as math.floor(n)
Parameters
- key String name of a math library function
Returns
- Function math library function (or any other value stored in math under that key)