}
public void testVectorTwoPairs() {
Vector3D u1 = new Vector3D(3, 0, 0);
Vector3D u2 = new Vector3D(0, 5, 0);
Vector3D v1 = new Vector3D(0, 0, 2);
Vector3D v2 = new Vector3D(-2, 0, 2);
Rotation r = new Rotation(u1, u2, v1, v2);
checkVector(r.applyTo(Vector3D.PLUS_I), Vector3D.PLUS_K);
checkVector(r.applyTo(Vector3D.PLUS_J), Vector3D.MINUS_I);
r = new Rotation(u1, u2, u1.negate(), u2.negate());
Vector3D axis = r.getAxis();
if (Vector3D.dotProduct(axis, Vector3D.PLUS_K) > 0) {
checkVector(axis, Vector3D.PLUS_K);
} else {
checkVector(axis, Vector3D.MINUS_K);
}
checkAngle(r.getAngle(), Math.PI);
double sqrt = Math.sqrt(2) / 2;
r = new Rotation(Vector3D.PLUS_I, Vector3D.PLUS_J,
new Vector3D(0.5, 0.5, sqrt),
new Vector3D(0.5, 0.5, -sqrt));
checkRotation(r, sqrt, 0.5, 0.5, 0);
r = new Rotation(u1, u2, u1, Vector3D.crossProduct(u1, u2));
checkRotation(r, sqrt, -sqrt, 0, 0);