예제 #1
0
    public void ToArray2D()
    {
      Matrix33D m = new Matrix33D(1, 2, 3, 4, 5, 6, 7, 8, 9);

      double[,] array = m.ToArray2D();
      for (int i = 0; i < 3; i++)
        for (int j = 0; j < 3; j++)
          Assert.AreEqual(i * 3 + j + 1, array[i, j]);

      array = (double[,])m;
      for (int i = 0; i < 3; i++)
        for (int j = 0; j < 3; j++)
          Assert.AreEqual(i * 3 + j + 1, array[i, j]);
    }
예제 #2
0
        public void ToArray2D()
        {
            Matrix33D m = new Matrix33D(1, 2, 3, 4, 5, 6, 7, 8, 9);

              double[,] array = m.ToArray2D();
              for (int i = 0; i < 3; i++)
            for (int j = 0; j < 3; j++)
              Assert.AreEqual(i * 3 + j + 1, array[i, j]);

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