Added identity matrix
This commit is contained in:
parent
9562d8615a
commit
41a70d45b8
2 changed files with 27 additions and 0 deletions
|
|
@ -80,4 +80,15 @@ public class MatrixMathTest {
|
|||
}
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
public void identity(){
|
||||
assertArrayEquals(
|
||||
new double[][]{{1}},
|
||||
MatrixMath.identity(1));
|
||||
|
||||
assertArrayEquals(
|
||||
new double[][]{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}},
|
||||
MatrixMath.identity(4));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue