MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / numarith

Function numarith

ThirdParty/lua/lua/lobject.c:96–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94
95
96static lua_Number numarith (lua_State *L, int op, lua_Number v1,
97 lua_Number v2) {
98 switch (op) {
99 case LUA_OPADD: return luai_numadd(L, v1, v2);
100 case LUA_OPSUB: return luai_numsub(L, v1, v2);
101 case LUA_OPMUL: return luai_nummul(L, v1, v2);
102 case LUA_OPDIV: return luai_numdiv(L, v1, v2);
103 case LUA_OPPOW: return luai_numpow(L, v1, v2);
104 case LUA_OPIDIV: return luai_numidiv(L, v1, v2);
105 case LUA_OPUNM: return luai_numunm(L, v1);
106 case LUA_OPMOD: {
107 lua_Number m;
108 luai_nummod(L, v1, v2, m);
109 return m;
110 }
111 default: lua_assert(0); return 0;
112 }
113}
114
115
116void luaO_arith (lua_State *L, int op, const TValue *p1, const TValue *p2,

Callers 1

luaO_arithFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected