MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaL_checknumber

Function luaL_checknumber

deps/lua/src/lauxlib.c:176–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174
175
176LUALIB_API lua_Number luaL_checknumber (lua_State *L, int narg) {
177 lua_Number d = lua_tonumber(L, narg);
178 if (d == 0 && !lua_isnumber(L, narg)) /* avoid extra test when d is not 0 */
179 tag_error(L, narg, LUA_TNUMBER);
180 return d;
181}
182
183
184LUALIB_API lua_Number luaL_optnumber (lua_State *L, int narg, lua_Number def) {

Callers 15

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
math_ceilFunction · 0.85

Calls 3

lua_tonumberFunction · 0.85
lua_isnumberFunction · 0.85
tag_errorFunction · 0.85

Tested by

no test coverage detected