MCPcopy Create free account
hub / github.com/DFHack/dfhack / luaL_checknumber

Function luaL_checknumber

depends/lua/src/lauxlib.c:408–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406
407
408LUALIB_API lua_Number luaL_checknumber (lua_State *L, int arg) {
409 int isnum;
410 lua_Number d = lua_tonumberx(L, arg, &isnum);
411 if (!isnum)
412 tag_error(L, arg, LUA_TNUMBER);
413 return d;
414}
415
416
417LUALIB_API lua_Number luaL_optnumber (lua_State *L, int arg, lua_Number def) {

Callers 15

dfhack_timeoutFunction · 0.85
eval_perlin_1Function · 0.85
eval_perlin_2Function · 0.85
eval_perlin_3Function · 0.85
math_absFunction · 0.85
math_sinFunction · 0.85
math_cosFunction · 0.85
math_tanFunction · 0.85
math_asinFunction · 0.85
math_acosFunction · 0.85
math_atanFunction · 0.85
math_floorFunction · 0.85

Calls 2

lua_tonumberxFunction · 0.85
tag_errorFunction · 0.85

Tested by

no test coverage detected