MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaL_checknumber

Function luaL_checknumber

Source/Misc/lua/src/lua.c:10388–10393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10386
10387
10388LUALIB_API lua_Number luaL_checknumber (lua_State *L, int narg) {
10389lua_Number d = lua_tonumber(L, narg);
10390if (d == 0 && !lua_isnumber(L, narg)) /* avoid extra test when d is not 0 */
10391tag_error(L, narg, LUA_TNUMBER);
10392return d;
10393}
10394
10395
10396LUALIB_API lua_Number luaL_optnumber (lua_State *L, int narg, lua_Number def) {

Callers 15

usb.cFile · 0.85
math_absFunction · 0.85
math_sinFunction · 0.85
math_sinhFunction · 0.85
math_cosFunction · 0.85
math_coshFunction · 0.85
math_tanFunction · 0.85
math_tanhFunction · 0.85
math_asinFunction · 0.85
math_acosFunction · 0.85
math_atanFunction · 0.85
math_atan2Function · 0.85

Calls 3

lua_tonumberFunction · 0.85
lua_isnumberFunction · 0.85
tag_errorFunction · 0.85

Tested by

no test coverage detected