MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / Meta_Sub

Method Meta_Sub

LuaSTGPlus/LuaWrapper.cpp:125–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 return 1;
124 }
125 static int Meta_Sub(lua_State* L)LNOEXCEPT
126 {
127 fcyColor* pA = static_cast<fcyColor*>(luaL_checkudata(L, 1, TYPENAME_COLOR));
128 fcyColor* pB = static_cast<fcyColor*>(luaL_checkudata(L, 2, TYPENAME_COLOR));
129 fcyColor* pResult = CreateAndPush(L);
130 pResult->Set(
131 ::max((int)pA->a - pB->a, 0),
132 ::max((int)pA->r - pB->r, 0),
133 ::max((int)pA->g - pB->g, 0),
134 ::max((int)pA->b - pB->b, 0)
135 );
136 return 1;
137 }
138 static int Meta_Mul(lua_State* L)LNOEXCEPT
139 {
140 lua_Number tFactor;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected