MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / math_abs

Function math_abs

third-party/lua-5.5.0/src/lmathlib.c:30–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29
30static int math_abs (lua_State *L) {
31 if (lua_isinteger(L, 1)) {
32 lua_Integer n = lua_tointeger(L, 1);
33 if (n < 0) n = (lua_Integer)(0u - (lua_Unsigned)n);
34 lua_pushinteger(L, n);
35 }
36 else
37 lua_pushnumber(L, l_mathop(fabs)(luaL_checknumber(L, 1)));
38 return 1;
39}
40
41
42static int math_sin (lua_State *L) {

Callers

nothing calls this directly

Calls 5

lua_isintegerFunction · 0.70
lua_pushintegerFunction · 0.70
lua_pushnumberFunction · 0.70
luaL_checknumberFunction · 0.70
lua_tointegerFunction · 0.50

Tested by

no test coverage detected