Function lua_tonumber

Source
pub unsafe fn lua_tonumber(L: *mut lua_State, idx: c_int) -> lua_Number
Expand description

Attempts to convert the value at the given index to a number, and returns it.

If the value at the given index cannot be converted to a number, this function will return 0.0.

This function will leave numbers as is, and will transform strings which can be parsed as numbers into numbers. This will modify the stack.