MCPcopy Create free account
hub / github.com/Tencent/xLua / xlua_pack_float3

Function xlua_pack_float3

WebGLPlugins/xlua.c:935–946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

933}
934
935LUALIB_API int xlua_pack_float3(void *p, int offset, float f1, float f2, float f3) {
936 CSharpStruct *css = (CSharpStruct *)p;
937 if (css->fake_id != -1 || css->len < offset + sizeof(float) * 3) {
938 return 0;
939 } else {
940 float *pos = (float *)(&(css->data[0]) + offset);
941 pos[0] = f1;
942 pos[1] = f2;
943 pos[2] = f3;
944 return 1;
945 }
946}
947
948LUALIB_API int xlua_unpack_float3(void *p, int offset, float *f1, float *f2, float *f3) {
949 CSharpStruct *css = (CSharpStruct *)p;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected