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

Function xlua_unpack_float4

WebGLPlugins/xlua.c:975–987  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;
977 if (css->fake_id != -1 || css->len < offset + sizeof(float) * 4) {
978 return 0;
979 } else {
980 float *pos = (float *)(&(css->data[0]) + offset);
981 *f1 = pos[0];
982 *f2 = pos[1];
983 *f3 = pos[2];
984 *f4 = pos[3];
985 return 1;
986 }
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;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected