public void ToArray2D() { Matrix22D m = new Matrix22D(1, 2, 3, 4); double[,] array = m.ToArray2D(); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { Assert.AreEqual(i * 2 + j + 1, array[i, j]); } } array = (double[, ])m; for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { Assert.AreEqual(i * 2 + j + 1, array[i, j]); } } }
public void ToArray2D() { Matrix22D m = new Matrix22D(1, 2, 3, 4); double[,] array = m.ToArray2D(); for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) Assert.AreEqual(i * 2 + j + 1, array[i, j]); array = (double[,])m; for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) Assert.AreEqual(i * 2 + j + 1, array[i, j]); }