void () { Matrix matrix = Matrix.createIdentity(3); int width = matrix.getColumns(); assertEquals(3, width); int height = matrix.getRows(); assertEquals(3, height); for (int w = 0; w < width; w++) { for (int h = 0; h < height; h++) { assertEquals((double)(w == h ? 1 : 0), matrix.get(w, h)); } } Vector vector0 = Vector.create(1, 0, 0); assertEquals(vector0, matrix.getRow(0)); assertEquals(vector0, matrix.getColumn(0)); Vector vector1 = Vector.create(0, 1, 0); assertEquals(vector1, matrix.getRow(1)); assertEquals(vector1, matrix.getColumn(1)); Vector vector2 = Vector.create(0, 0, 1); assertEquals(vector2, matrix.getRow(2)); assertEquals(vector2, matrix.getColumn(2)); }