public double distance(Vector2D v){
  double delx=v.x - x;
  double dely=v.y - y;
  return Math.sqrt(delx * delx + dely * dely);
}

public double distance ( Vector2D v ) { double delx = v . x - x ; double dely = v . y - y ; return Math . sqrt ( delx * delx + dely * dely ) ; }
computes the distance between this vector and another one .
