MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / numarith

Function numarith

extlibs/lua/src/lobject.c:73–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71
72
73static lua_Number numarith (lua_State *L, int op, lua_Number v1,
74 lua_Number v2) {
75 switch (op) {
76 case LUA_OPADD: return luai_numadd(L, v1, v2);
77 case LUA_OPSUB: return luai_numsub(L, v1, v2);
78 case LUA_OPMUL: return luai_nummul(L, v1, v2);
79 case LUA_OPDIV: return luai_numdiv(L, v1, v2);
80 case LUA_OPPOW: return luai_numpow(L, v1, v2);
81 case LUA_OPIDIV: return luai_numidiv(L, v1, v2);
82 case LUA_OPUNM: return luai_numunm(L, v1);
83 case LUA_OPMOD: return luaV_modf(L, v1, v2);
84 default: lua_assert(0); return 0;
85 }
86}
87
88
89int luaO_rawarith (lua_State *L, int op, const TValue *p1, const TValue *p2,

Callers 1

luaO_rawarithFunction · 0.85

Calls 1

luaV_modfFunction · 0.85

Tested by

no test coverage detected