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

Function Quat_concat

engine/script/src/script_vmath.cpp:681–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

679 }
680
681 static int Quat_concat(lua_State *L)
682 {
683 size_t size = 0;
684 const char* s = luaL_checklstring(L, 1, &size);
685 Quat* q = CheckQuat(L, 2);
686 const int buffer_size = size + MAX_CHARS_PER_QUAT + 1;
687 char* buffer = new char[buffer_size];
688 // Use same format as Lua when converting number to string (from LUA_NUMBER_FMT in luaconf.h)
689 dmSnPrintf(buffer, buffer_size, STRING_FORMAT_CONCAT_QUAT, s, q->getX(), q->getY(), q->getZ(), q->getW());
690 lua_pushstring(L, buffer);
691 delete [] buffer;
692 return 1;
693 }
694
695 static int Quat_eq(lua_State *L)
696 {

Callers

nothing calls this directly

Calls 8

luaL_checklstringFunction · 0.85
CheckQuatFunction · 0.85
dmSnPrintfFunction · 0.85
lua_pushstringFunction · 0.85
getXMethod · 0.45
getYMethod · 0.45
getZMethod · 0.45
getWMethod · 0.45

Tested by

no test coverage detected