public double distance(Vector2 point){
  double dx=this.x - point.x;
  double dy=this.y - point.y;
  return Math.sqrt(dx * dx + dy * dy);
}

public double distance ( Vector2 point ) { double dx = this . x - point . x ; double dy = this . y - point . y ; return Math . sqrt ( dx * dx + dy * dy ) ; }
returns the distance from this point to the given point .
