| 946 | } |
| 947 | |
| 948 | LUALIB_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 | |
| 961 | LUALIB_API int xlua_pack_float4(void *p, int offset, float f1, float f2, float f3, float f4) { |
| 962 | CSharpStruct *css = (CSharpStruct *)p; |
nothing calls this directly
no outgoing calls
no test coverage detected