src/main/java/chalmers/pimp/model/Point.java
public double distance(Point p) {
    Objects.requireNonNull(p);
    double dy = p.y - y;
    double dx = p.x - x;
    return Math.sqrt(dy * dy + dx * dx);
  }
/**
   * Returns the distance between this and point p
   *
   * @param p the point to be compared with
   * @return the distance this point and point p
   * @throws NullPointerException if the specified point is {@ode null}
   */
Returns the distance between this and point p
@param p the point to be compared with
@return the distance this point and point p
@throws NullPointerException if the specified point is  null
Returns the distance between this and point p @param p the point to be compared with @return the distance this point and point p @throws NullPointerException if the specified point is null
public double distance(Point p) {
    Objects.requireNonNull(p);
    double dy = p.y - y;
    double dx = p.x - x;
    return Math.sqrt(dy * dy + dx * dx);
  }
public double distance ( Point p ) { Objects . requireNonNull ( p ) ; double dy = p . y - y ; double dx = p . x - x ; return Math . sqrt ( dy * dy + dx * dx ) ; }
Returns the distance between this and point p
 @param p the point to be compared with
 @return the distance this point and point p
 @throws NullPointerException if the specified point is {@ode null}
Returns the distance between this and point p @param p the point to be compared with @return the distance this point and point p @throws NullPointerException if the specified point is { @ode null }