public virtual void TestFloat() { float l1 = (float)785412.4875; byte[] b2 = byteArrayConverter.FloatToByteArray(l1); float l2 = byteArrayConverter.ByteArrayToFloat(b2); AssertEquals(l1, l2, 0); }
public virtual float ReadFloat(string label) { long position = io.GetCurrentPosition(); float f = byteArrayConverter.ByteArrayToFloat(ReadFloatBytes()); if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogId) && canLog) { NeoDatis.Tool.DLogger.Debug("Reading float '" + f + "' at " + position + (label != null ? " : " + label : string.Empty)); } return(f); }