| new Matrix3().column(3);
}
@Test
public void testRow() {
final Matrix3 m = new Matrix3(
1., 2., 3.,
4., 5., 6.,
7., 8., 9.);
final Vector3 r1 = m.row(0);
assertEquals(1., r1.x);
assertEquals(2., r1.y);
assertEquals(3., r1.z);
final Vector3 r2 = m.row(1);
assertNotSame(r1, r2); // Vector is not recycled
assertEquals(4., r2.x);
assertEquals(5., r2.y);
assertEquals(6., r2.z);
final Vector3 r3 = m.row(2);
assertEquals(7., r3.x);
assertEquals(8., r3.y);
assertEquals(9., r3.z);
}
|