/// <summary> /// Reads a 8 byte float from the buffer. This is always 8 bytes on the wire. /// </summary> public double ReadDouble() { #if INCLUDE_IL2CPP return(BitConverter.ToDouble(BitConverter.GetBytes(ReadUInt64()), 0)); #else ulong value = ReadUInt64(); return(FloatConversion.ToDouble(value)); #endif }
/// <summary> /// Reads a 4 byte float from the buffer. This is always 4 bytes on the wire. /// </summary> public float ReadSingle() { #if INCLUDE_IL2CPP return(BitConverter.ToSingle(BitConverter.GetBytes(ReadUInt32()), 0)); #else uint value = ReadUInt32(); return(FloatConversion.ToSingle(value)); #endif }