code: private static Point2d getMidPoint(Tuple2d a, Tuple2d b) {
          return new Point2d((a.x + b.x) / 2, (a.y + b.y) / 2);
      }
docs: Get the middle of two provide points.
  
  @param a first point
  @param b second point
  @return mid