public double distance(DoubleVector v){
  double deltaX=v.x - x, deltaY=v.y - y, deltaZ=v.z - z;
  return Math.sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ);
}

public double distance ( DoubleVector v ) { double deltaX = v . x - x , deltaY = v . y - y , deltaZ = v . z - z ; return Math . sqrt ( deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ ) ; }
calculates the squared distance between the point corresponding to this vector and the point corresponding to the vector v .
