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

Function xlua_pack_float6

WebGLPlugins/xlua.c:1019–1033  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1017}
1018
1019LUALIB_API int xlua_pack_float6(void *p, int offset, float f1, float f2, float f3, float f4, float f5, float f6) {
1020 CSharpStruct *css = (CSharpStruct *)p;
1021 if (css->fake_id != -1 || css->len < offset + sizeof(float) * 6) {
1022 return 0;
1023 } else {
1024 float *pos = (float *)(&(css->data[0]) + offset);
1025 pos[0] = f1;
1026 pos[1] = f2;
1027 pos[2] = f3;
1028 pos[3] = f4;
1029 pos[4] = f5;
1030 pos[5] = f6;
1031 return 1;
1032 }
1033}
1034
1035LUALIB_API int xlua_unpack_float6(void *p, int offset, float *f1, float *f2, float *f3, float *f4, float *f5, float *f6) {
1036 CSharpStruct *css = (CSharpStruct *)p;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected