示例#1
0
 public override int GetHashCode()
 {
     return(HashCode.Combine(
                HashCode.Combine(M00.RoundToEpsilon(), M01.RoundToEpsilon(), M02.RoundToEpsilon()),
                HashCode.Combine(M10.RoundToEpsilon(), M11.RoundToEpsilon(), M12.RoundToEpsilon()),
                HashCode.Combine(M20.RoundToEpsilon(), M21.RoundToEpsilon(), M22.RoundToEpsilon())));
 }
示例#2
0
 public override int GetHashCode()
 {
     return(M00.GetHashCode() ^ M01.GetHashCode() ^ M02.GetHashCode() ^ M03.GetHashCode() ^
            M10.GetHashCode() ^ M11.GetHashCode() ^ M12.GetHashCode() ^ M13.GetHashCode() ^
            M20.GetHashCode() ^ M21.GetHashCode() ^ M22.GetHashCode() ^ M23.GetHashCode() ^
            M30.GetHashCode() ^ M31.GetHashCode() ^ M32.GetHashCode() ^ M33.GetHashCode());
 }
示例#3
0
 public override string ToString()
 {
     return(M00.ToString() + "," + M01.ToString() + "," + M02.ToString() + "," + M03.ToString() + "\r\n"
            + M10.ToString() + "," + M11.ToString() + "," + M12.ToString() + "," + M13.ToString() + "\r\n"
            + M20.ToString() + "," + M21.ToString() + "," + M22.ToString() + "," + M23.ToString() + "\r\n"
            + M30.ToString() + "," + M31.ToString() + "," + M32.ToString() + "," + M33.ToString());
 }
示例#4
0
        //// ===========================================================================================================
        //// Equality Members
        //// ===========================================================================================================

        public bool Equals(Matrix2x2 other)
        {
            return(M00.IsApproximatelyEqual(other.M00) &&
                   M01.IsApproximatelyEqual(other.M01) &&
                   M10.IsApproximatelyEqual(other.M10) &&
                   M11.IsApproximatelyEqual(other.M11));
        }
示例#5
0
        public override int GetHashCode()
        {
            // Overflow is fine, just wrap
            unchecked
            {
                int hash = 17;

                hash = hash * 29 + M00.GetHashCode();
                hash = hash * 29 + M01.GetHashCode();
                hash = hash * 29 + M02.GetHashCode();
                hash = hash * 29 + M03.GetHashCode();

                hash = hash * 29 + M10.GetHashCode();
                hash = hash * 29 + M11.GetHashCode();
                hash = hash * 29 + M12.GetHashCode();
                hash = hash * 29 + M13.GetHashCode();

                hash = hash * 29 + M20.GetHashCode();
                hash = hash * 29 + M21.GetHashCode();
                hash = hash * 29 + M22.GetHashCode();
                hash = hash * 29 + M23.GetHashCode();

                return(hash);
            }
        }
示例#6
0
        //// ===========================================================================================================
        //// Equality Members
        //// ===========================================================================================================

        public bool Equals(Matrix3x3 other)
        {
            return(M00.IsApproximatelyEqual(other.M00) &&
                   M01.IsApproximatelyEqual(other.M01) &&
                   M02.IsApproximatelyEqual(other.M02) &&

                   M10.IsApproximatelyEqual(other.M10) &&
                   M11.IsApproximatelyEqual(other.M11) &&
                   M12.IsApproximatelyEqual(other.M12) &&

                   M20.IsApproximatelyEqual(other.M20) &&
                   M21.IsApproximatelyEqual(other.M21) &&
                   M22.IsApproximatelyEqual(other.M22));
        }
示例#7
0
        //// ===========================================================================================================
        //// Equality Members
        //// ===========================================================================================================

        public bool Equals(Matrix4x4 other)
        {
            // Check the diagonals first to see if we can exit early for identity matrix equality.
            return(M00.IsApproximatelyEqual(other.M00) &&
                   M11.IsApproximatelyEqual(other.M11) &&
                   M22.IsApproximatelyEqual(other.M22) &&
                   M33.IsApproximatelyEqual(other.M33) &&

                   M01.IsApproximatelyEqual(other.M01) &&
                   M02.IsApproximatelyEqual(other.M02) &&
                   M03.IsApproximatelyEqual(other.M03) &&

                   M10.IsApproximatelyEqual(other.M10) &&
                   M12.IsApproximatelyEqual(other.M12) &&
                   M13.IsApproximatelyEqual(other.M13) &&

                   M20.IsApproximatelyEqual(other.M20) &&
                   M21.IsApproximatelyEqual(other.M21) &&
                   M23.IsApproximatelyEqual(other.M23) &&

                   M30.IsApproximatelyEqual(other.M30) &&
                   M31.IsApproximatelyEqual(other.M31) &&
                   M32.IsApproximatelyEqual(other.M32));
        }
示例#8
0
 /// <summary>
 /// Returns a hash code for this GRaff.Matrix.
 /// </summary>
 /// <returns>An integer value that specifies a hash value for this GRaff.Matrix.</returns>
 public override int GetHashCode()
 => GMath.HashCombine(M00.GetHashCode(), M01.GetHashCode(), M02.GetHashCode(), M10.GetHashCode(), M11.GetHashCode(), M12.GetHashCode());
示例#9
0
 1 => new S2Point(M10, M11, M12),
 2 => new S2Point(M20, M21, M22),
示例#10
0
        //#endif

        #endregion

        #region IEquatable<Matrix4x4d> Members

        public bool Equals(Matrix4x4d other)
        {
            // Check reference first.
            if (object.ReferenceEquals(this, other))
            {
                return(true);
            }

            // Check for value equality.
            if (!M00.Equals(other.M00))
            {
                return(false);
            }
            if (!M10.Equals(other.M10))
            {
                return(false);
            }
            if (!M20.Equals(other.M20))
            {
                return(false);
            }
            if (!M30.Equals(other.M30))
            {
                return(false);
            }
            if (!M01.Equals(other.M01))
            {
                return(false);
            }
            if (!M11.Equals(other.M11))
            {
                return(false);
            }
            if (!M21.Equals(other.M21))
            {
                return(false);
            }
            if (!M31.Equals(other.M31))
            {
                return(false);
            }
            if (!M02.Equals(other.M02))
            {
                return(false);
            }
            if (!M12.Equals(other.M12))
            {
                return(false);
            }
            if (!M22.Equals(other.M22))
            {
                return(false);
            }
            if (!M32.Equals(other.M32))
            {
                return(false);
            }
            if (!M03.Equals(other.M03))
            {
                return(false);
            }
            if (!M13.Equals(other.M13))
            {
                return(false);
            }
            if (!M23.Equals(other.M23))
            {
                return(false);
            }
            if (!M33.Equals(other.M33))
            {
                return(false);
            }
            return(true);
        }
示例#11
0
 void M11()
 {
     M10()(0);
 }
示例#12
0
 public void Do <T, U, V, W, X>(M10 <T, U, V, W, X> m)
 {
     DoAny(m);
 }
示例#13
0
 EAxis.Y => new FVector(M10, M11, M12),