127128129130131132133134135136137
source[ 2 ] = 0; source[ 3 ] = 0; expectedTarget[ 0 ] = source[ 0 ]; expectedTarget[ 1 ] = source[ 1 ]; expectedTarget[ 2 ] = 0; t.apply( source, target ); assertArrayEquals( expectedTarget, target ); source[ 0 ] = 0; source[ 1 ] = 0; source[ 2 ] = 0;
137138139140141142143144145146147
source[ 2 ] = 0; source[ 3 ] = 1; expectedTarget[ 0 ] = source[ 0 ]; expectedTarget[ 1 ] = source[ 1 ]; expectedTarget[ 2 ] = 30; t.apply( source, target ); assertArrayEquals( expectedTarget, target ); source[ 0 ] = 9; source[ 1 ] = 4; source[ 2 ] = 2;
147148149150151152153154155156157
source[ 2 ] = 2; source[ 3 ] = 3; expectedTarget[ 0 ] = source[ 0 ]; expectedTarget[ 1 ] = source[ 1 ]; expectedTarget[ 2 ] = 2 + 3 * 30; t.apply( source, target ); assertArrayEquals( expectedTarget, target ); } @Test public void test4Dto3DInverse()