Example #1
0
        public void EqualsTest()
        {
            MatrixD m1 = new MatrixD(3, 4, rowMajor, MatrixOrder.RowMajor);
              MatrixD m2 = new MatrixD(3, 4, rowMajor, MatrixOrder.RowMajor);
              MatrixD nullMatrix = null;
              Assert.IsTrue(m1.Equals(m1));
              Assert.IsTrue(m1.Equals(m2));
              Assert.IsFalse(m1.Equals(nullMatrix));

              Assert.IsTrue(((object) m1).Equals((object) m1));
              Assert.IsTrue(((object) m1).Equals((object) m2));
              Assert.IsFalse(((object) m1).Equals((object) nullMatrix));

              m2 += new MatrixD(3, 4, 0.1);
              Assert.IsFalse(m1.Equals(m2));
        }