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

Function xlua_pack_float4

WebGLPlugins/xlua.c:961–973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

959}
960
961LUALIB_API int xlua_pack_float4(void *p, int offset, float f1, float f2, float f3, float f4) {
962 CSharpStruct *css = (CSharpStruct *)p;
963 if (css->fake_id != -1 || css->len < offset + sizeof(float) * 4) {
964 return 0;
965 } else {
966 float *pos = (float *)(&(css->data[0]) + offset);
967 pos[0] = f1;
968 pos[1] = f2;
969 pos[2] = f3;
970 pos[3] = f4;
971 return 1;
972 }
973}
974
975LUALIB_API int xlua_unpack_float4(void *p, int offset, float *f1, float *f2, float *f3, float *f4) {
976 CSharpStruct *css = (CSharpStruct *)p;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected