public void ClampsToZero() { packer.Pack(writer, -4.5f); var outValue = packer.Unpack(GetReader()); Assert.That(outValue, Is.Zero); }
public void UnpackedValueIsWithinPrecision() { var start = GetRandomFloat(); var packed = packer.Pack(start); var unpacked = packer.Unpack(packed); Assert.That(unpacked, Is.EqualTo(start).Within(precsion)); }