public void ToArrayJagged() { Matrix22F m = new Matrix22F(1, 2, 3, 4); float[][] array = m.ToArrayJagged(); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { Assert.AreEqual(i * 2 + j + 1, array[i][j]); } } array = (float[][])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 ToArrayJagged() { Matrix22F m = new Matrix22F(1, 2, 3, 4); float[][] array = m.ToArrayJagged(); for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) Assert.AreEqual(i * 2 + j + 1, array[i][j]); array = (float[][]) m; for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) Assert.AreEqual(i * 2 + j + 1, array[i][j]); }