public double[] towardsVector(double fromX, double fromY, double fromZ,
double toX, double toY, double toZ,
boolean wrap)
throws AgentException {
if (fromX == toX && fromY == toY && fromZ == toZ) {
throw new AgentException
("no pitch is defined from a point (" +
fromX + "," + fromY + "," + fromZ + ") to that same point");
}
double dx = toX - fromX;
double dy = toY - fromY;