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

Function xlua_unpack_float3

WebGLPlugins/xlua.c:948–959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

946}
947
948LUALIB_API int xlua_unpack_float3(void *p, int offset, float *f1, float *f2, float *f3) {
949 CSharpStruct *css = (CSharpStruct *)p;
950 if (css->fake_id != -1 || css->len < offset + sizeof(float) * 3) {
951 return 0;
952 } else {
953 float *pos = (float *)(&(css->data[0]) + offset);
954 *f1 = pos[0];
955 *f2 = pos[1];
956 *f3 = pos[2];
957 return 1;
958 }
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;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected