double edist(coord *a,  /* Returns Euclidean distance from a to b */
	     coord *b);

double tdist(coord *a,  /* Returns minimum distance from a to b on a torus */
	     coord *b,
	     double x,  /* The rectangular representation of the torus is */
	     double y); /* x by y */
