Beispiel #1
0
 public void ToMatrix33FException2()
 {
     MatrixF m = new MatrixF(4, 3);
       Matrix33F m33 = m.ToMatrix33F();
 }
Beispiel #2
0
 public void ToMatrix33FException3()
 {
     MatrixF m = new MatrixF(3, 4);
       Matrix33F m33 = m.ToMatrix33F();
 }
Beispiel #3
0
        public void ToMatrix33F()
        {
            float[] values = new float[] { 1.0f, 2.0f, 3.0f,
                                     4.0f, 5.0f, 6.0f,
                                     7.0f, 8.0f, 9.0f };
              MatrixF m = new MatrixF(3, 3, values, MatrixOrder.RowMajor);

              Matrix33F m33 = m.ToMatrix33F();
              for (int i = 0; i < 3; i++)
            for (int j = 0; j < 3; j++)
              Assert.AreEqual(i * 3 + j + 1, m33[i, j]);

              m33 = (Matrix33F) m;
              for (int i = 0; i < 3; i++)
            for (int j = 0; j < 3; j++)
              Assert.AreEqual(i * 3 + j + 1, m33[i, j]);
        }