public override void Read(Library.Collections.BitStream stream, out Half value, MySerializeInfo info)
 {
     if (info.IsNormalized && info.IsFixed8)
     {
         value = stream.ReadByte() / 255.0f;
     }
     else
     {
         value = stream.ReadHalf();
     }
 }
Beispiel #2
0
 public override void Read(Library.Collections.BitStream stream, out float value, MySerializeInfo info)
 {
     if (info.IsNormalized && info.IsFixed8)
     {
         value = stream.ReadByte() / 255.0f;
     }
     else if (info.IsNormalized && info.IsFixed16)
     {
         value = stream.ReadUInt16() / 65535.0f;
     }
     else
     {
         value = stream.ReadFloat();
     }
 }
Beispiel #3
0
 public override void Read(Library.Collections.BitStream stream, out Byte value, MySerializeInfo info)
 {
     value = stream.ReadByte();
 }