/// <summary> /// Writes floating point number with double precision /// </summary> /// <param name="elementId"></param> /// <param name="value"></param> /// <returns></returns> public int Write(VInt elementId, double value) { var u = new Union { dval = value }.ulval; return elementId.Write(_stream) + EncodeWidth(8).Write(_stream) + WriteUInt(u, 8); }
/// <summary> /// Writes floating point number /// </summary> /// <param name="elementId"></param> /// <param name="value"></param> /// <returns></returns> public int Write(VInt elementId, float value) { var u = new Union {fval = value}.uival; return elementId.Write(_stream) + EncodeWidth(4).Write(_stream) + WriteInt(u, 4); }