public double distance3D(Coordinate c){
  double dx=x - c.x;
  double dy=y - c.y;
  double dz=z - c.z;
  return Math.sqrt(dx * dx + dy * dy + dz * dz);
}

public double distance3D ( Coordinate c ) { double dx = x - c . x ; double dy = y - c . y ; double dz = z - c . z ; return Math . sqrt ( dx * dx + dy * dy + dz * dz ) ; }
computes the 3 - dimensional euclidean distance to another location .
