MCPcopy Create free account
hub / github.com/Tencent/UnLua / pb_encode_float

Function pb_encode_float

Plugins/UnLuaExtensions/LuaProtobuf/Source/src/pb.h:392–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390{ uint64_t m = (uint64_t)1U << 31; return (value ^ m) - m; }
391
392PB_API uint32_t pb_encode_float(float value)
393{ union { uint32_t u32; float f; } u; u.f = value; return u.u32; }
394
395PB_API float pb_decode_float(uint32_t value)
396{ union { uint32_t u32; float f; } u; u.u32 = value; return u.f; }

Callers 2

lpb_addtypeFunction · 0.85
Lconv_encode_floatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected