예제 #1
0
        /// <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);
        }
예제 #2
0
파일: ErlDouble.cs 프로젝트: chadfords/nfx
 /// <summary>
 /// Determine if two instances are equal
 /// </summary>
 public bool Equals(ErlDouble o, double precision = 0d)
 {
     return(Math.Abs(Value - o.Value) <= precision);
 }