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

Function xlua_pack_float5

WebGLPlugins/xlua.c:989–1002  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

987}
988
989LUALIB_API int xlua_pack_float5(void *p, int offset, float f1, float f2, float f3, float f4, float f5) {
990 CSharpStruct *css = (CSharpStruct *)p;
991 if (css->fake_id != -1 || css->len < offset + sizeof(float) * 5) {
992 return 0;
993 } else {
994 float *pos = (float *)(&(css->data[0]) + offset);
995 pos[0] = f1;
996 pos[1] = f2;
997 pos[2] = f3;
998 pos[3] = f4;
999 pos[4] = f5;
1000 return 1;
1001 }
1002}
1003
1004LUALIB_API int xlua_unpack_float5(void *p, int offset, float *f1, float *f2, float *f3, float *f4, float *f5) {
1005 CSharpStruct *css = (CSharpStruct *)p;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected