public double distance(double x,double y,double z){
  double xd=this.x - x;
  double yd=this.y - y;
  double zd=this.z - z;
  return Math.sqrt(xd * xd + yd * yd + zd * zd);
}

public double distance ( double x , double y , double z ) { double xd = this . x - x ; double yd = this . y - y ; double zd = this . z - z ; return Math . sqrt ( xd * xd + yd * yd + zd * zd ) ; }
returns the distance from this point to the given point .
