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

Function xlua_unpack_float2

WebGLPlugins/xlua.c:923–933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

921}
922
923LUALIB_API int xlua_unpack_float2(void *p, int offset, float *f1, float *f2) {
924 CSharpStruct *css = (CSharpStruct *)p;
925 if (css->fake_id != -1 || css->len < offset + sizeof(float) * 2) {
926 return 0;
927 } else {
928 float *pos = (float *)(&(css->data[0]) + offset);
929 *f1 = pos[0];
930 *f2 = pos[1];
931 return 1;
932 }
933}
934
935LUALIB_API int xlua_pack_float3(void *p, int offset, float f1, float f2, float f3) {
936 CSharpStruct *css = (CSharpStruct *)p;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected