/// <summary> /// Write a double value to the stream /// </summary> public void WriteDouble(ErlDouble d) { write(ErlExternalTag.NewFloat); var data = BitConverter.GetBytes(d); if (BitConverter.IsLittleEndian) { Array.Reverse(data); } Write(data); }
/// <summary> /// Determine if two instances are equal /// </summary> public bool Equals(ErlDouble o, double precision = 0d) { return(Math.Abs(Value - o.Value) <= precision); }