MCPcopy Create free account
hub / github.com/defold/defold / Vector3_mul

Function Vector3_mul

engine/script/src/script_vmath.cpp:358–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356 }
357
358 static int Vector3_mul(lua_State *L)
359 {
360 Vector3* v = ToVector3(L, 1);
361 float s;
362 if (v != 0)
363 {
364 s = (float) luaL_checknumber(L, 2);
365 }
366 else
367 {
368 s = (float) luaL_checknumber(L, 1);
369 v = CheckVector3(L, 2);
370 }
371 PushVector3(L, *v * s);
372 return 1;
373 }
374
375 static int Vector3_div(lua_State *L)
376 {

Callers

nothing calls this directly

Calls 4

ToVector3Function · 0.85
luaL_checknumberFunction · 0.85
CheckVector3Function · 0.85
PushVector3Function · 0.85

Tested by

no test coverage detected