}
}
public void testAngle() {
assertEquals(0.22572612855273393616,
Vector3D.angle(new Vector3D(1, 2, 3), new Vector3D(4, 5, 6)),
1.0e-12);
assertEquals(7.98595620686106654517199e-8,
Vector3D.angle(new Vector3D(1, 2, 3), new Vector3D(2, 4, 6.000001)),
1.0e-12);
assertEquals(3.14159257373023116985197793156,
Vector3D.angle(new Vector3D(1, 2, 3), new Vector3D(-2, -4, -6.000001)),
1.0e-12);
try {
Vector3D.angle(new Vector3D(), Vector3D.plusI);
fail("an exception should have been thrown");
} catch (ArithmeticException ae) {
// expected behavior
} catch (Exception e) {
fail("wrong exception caught: " + e.getMessage());