code: private static double pointsDistance(Point a, Point b) {
          int dx = b.x - a.x;
          int dy = b.y - a.y;
          return Math.sqrt(dx * dx + dy * dy);
      }
docs: calculate distance of two points
  
  @param a
  @param b
  @return