Example #1
0
        /// <summary cref="IEncodeable.IsEqual(IEncodeable)" />
        public virtual bool IsEqual(IEncodeable encodeable)
        {
            if (Object.ReferenceEquals(this, encodeable))
            {
                return(true);
            }

            DoubleComplexType value = encodeable as DoubleComplexType;

            if (value == null)
            {
                return(false);
            }

            if (!Utils.IsEqual(m_real, value.m_real))
            {
                return(false);
            }
            if (!Utils.IsEqual(m_imaginary, value.m_imaginary))
            {
                return(false);
            }

            return(true);
        }
Example #2
0
        /// <summary cref="ICloneable.Clone" />
        public virtual object Clone()
        {
            DoubleComplexType clone = (DoubleComplexType)this.MemberwiseClone();

            clone.m_real      = (double)Utils.Clone(this.m_real);
            clone.m_imaginary = (double)Utils.Clone(this.m_imaginary);

            return(clone);
        }