public double distanceTo(Point2D that){
  double dx=this.x - that.x;
  double dy=this.y - that.y;
  return Math.sqrt(dx * dx + dy * dy);
}

public double distanceTo ( Point2D that ) { double dx = this . x - that . x ; double dy = this . y - that . y ; return Math . sqrt ( dx * dx + dy * dy ) ; }
returns the euclidean distance between this point and that point .
