public void ReadWriteFloat40Works(double input) { using (var ms = new MemoryStream()) using (var writer = new BinaryDataWriter(ms)) using (var reader = new BinaryDataReader(ms)) { writer.WriteFloat40(input); ms.Position = 0; var output = reader.ReadFloat40(); var tolerance = 1.0 / Math.Pow(10, 6); Assert.That(output, Is.EqualTo(input).Within(tolerance)); } }
public BinaryDataReader(BinaryDataReader buffer, int length) : this(buffer.stream, length) { }