Пример #1
0
        public float Unpack(NetworkReader reader)
        {
            uint zig    = (uint)VarIntBlocksPacker.Unpack(reader, blockSize);
            int  scaled = ZigZag.Decode(zig);

            return(scaled * precision);
        }
Пример #2
0
        public static int ReadPackedInt32(this NetworkReader reader)
        {
            var data = reader.ReadPackedUInt32();

            return(ZigZag.Decode(data));
        }
Пример #3
0
        public static long ReadPackedInt64(this NetworkReader reader)
        {
            ulong data = reader.ReadPackedUInt64();

            return(ZigZag.Decode(data));
        }