コード例 #1
0
        /// <summary>
        /// Determines whether the specified <see cref="SignedRational"/> is equal to this <see cref="SignedRational"/>.
        /// </summary>
        /// <param name="other">The <see cref="SignedRational"/> to compare this <see cref="SignedRational"/> with.</param>
        /// <returns>True when the specified <see cref="SignedRational"/> is equal to this <see cref="SignedRational"/>.</returns>
        public bool Equals(SignedRational other)
        {
            var left  = new BigRational(Numerator, Denominator);
            var right = new BigRational(other.Numerator, other.Denominator);

            return(left.Equals(right));
        }
コード例 #2
0
ファイル: Rational.cs プロジェクト: zhaoyingju/Magick.NET
        /// <summary>
        /// Determines whether the specified <see cref="Rational"/> is equal to this <see cref="Rational"/>.
        /// </summary>
        /// <param name="other">The <see cref="Rational"/> to compare this <see cref="Rational"/> with.</param>
        /// <returns>True when the specified <see cref="Rational"/> is equal to this <see cref="Rational"/>.</returns>
        public bool Equals(Rational other)
        {
            BigRational left  = new BigRational(Numerator, Denominator);
            BigRational right = new BigRational(other.Numerator, other.Denominator);

            return(left.Equals(right));
        }