MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaL_checknumber

Function luaL_checknumber

app/redis-6.2.6/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.70
math_sinFunction · 0.70
math_sinhFunction · 0.70
math_cosFunction · 0.70
math_coshFunction · 0.70
math_tanFunction · 0.70
math_tanhFunction · 0.70
math_asinFunction · 0.70
math_acosFunction · 0.70
math_atanFunction · 0.70
math_atan2Function · 0.70
math_ceilFunction · 0.70

Calls 3

lua_tonumberFunction · 0.85
lua_isnumberFunction · 0.70
tag_errorFunction · 0.70

Tested by

no test coverage detected