ToNumber converts the Lua value at index to the Go type for a Lua number (float64). The Lua value must be a number or a string convertible to a number. If the operation failed, the second return value will be false. http://www.lua.org/manual/5.2/manual.html#lua_tonumberx
(index int)
| 1400 | // |
| 1401 | // http://www.lua.org/manual/5.2/manual.html#lua_tonumberx |
| 1402 | func (l *State) ToNumber(index int) (float64, bool) { return l.toNumber(l.indexToValue(index)) } |
| 1403 | |
| 1404 | // ToBoolean converts the Lua value at index to a Go boolean. Like all |
| 1405 | // tests in Lua, the only false values are false booleans and nil. |