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

Function xlua_pack_float2

WebGLPlugins/xlua.c:911–921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

909PACK_UNPACK_OF(double);
910
911LUALIB_API int xlua_pack_float2(void *p, int offset, float f1, float f2) {
912 CSharpStruct *css = (CSharpStruct *)p;
913 if (css->fake_id != -1 || css->len < offset + sizeof(float) * 2) {
914 return 0;
915 } else {
916 float *pos = (float *)(&(css->data[0]) + offset);
917 pos[0] = f1;
918 pos[1] = f2;
919 return 1;
920 }
921}
922
923LUALIB_API int xlua_unpack_float2(void *p, int offset, float *f1, float *f2) {
924 CSharpStruct *css = (CSharpStruct *)p;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected