public double distanceFrom(Connection other){
  int xDiff=mPosition.x - other.getPosition().x;
  int yDiff=mPosition.y - other.getPosition().y;
  return Math.sqrt(xDiff * xDiff + yDiff * yDiff);
}

public double distanceFrom ( Connection other ) { int xDiff = mPosition . x - other . getPosition ( ) . x ; int yDiff = mPosition . y - other . getPosition ( ) . y ; return Math . sqrt ( xDiff * xDiff + yDiff * yDiff ) ; }
returns the distance between this connection and another connection .
