public void Float() { IByteMethods<float> methods = new Edu.Wisc.Forest.Flel.Util.ByteMethods.Float(); float origValue = (float) -9.876e5; byte[] bytes = methods.ToBytes(origValue); Assert.AreEqual(bytes.Length, sizeof(float)); float fromMthdResult = methods.FromBytes(bytes, 0); Assert.AreEqual(origValue, fromMthdResult); }
public void Float() { IByteMethods <float> methods = new Edu.Wisc.Forest.Flel.Util.ByteMethods.Float(); float origValue = (float)-9.876e5; byte[] bytes = methods.ToBytes(origValue); Assert.AreEqual(bytes.Length, sizeof(float)); float fromMthdResult = methods.FromBytes(bytes, 0); Assert.AreEqual(origValue, fromMthdResult); }