Beispiel #1
0
        public void TestEquals()
        {
            Matrix22D m1 = new Matrix22D(columnMajor, MatrixOrder.ColumnMajor);
            Matrix22D m2 = new Matrix22D(columnMajor, MatrixOrder.ColumnMajor);

            Assert.IsTrue(m1.Equals(m1));
            Assert.IsTrue(m1.Equals(m2));
            for (int i = 0; i < 4; i++)
            {
                m2     = new Matrix22D(columnMajor, MatrixOrder.ColumnMajor);
                m2[i] += 0.1;
                Assert.IsFalse(m1.Equals(m2));
            }

            Assert.IsFalse(m1.Equals(m1.ToString()));
        }
Beispiel #2
0
        public void TestEquals()
        {
            Matrix22D m1 = new Matrix22D(columnMajor, MatrixOrder.ColumnMajor);
              Matrix22D m2 = new Matrix22D(columnMajor, MatrixOrder.ColumnMajor);
              Assert.IsTrue(m1.Equals(m1));
              Assert.IsTrue(m1.Equals(m2));
              for (int i = 0; i < 4; i++)
              {
            m2 = new Matrix22D(columnMajor, MatrixOrder.ColumnMajor);
            m2[i] += 0.1;
            Assert.IsFalse(m1.Equals(m2));
              }

              Assert.IsFalse(m1.Equals(m1.ToString()));
        }