docs: private int getClosestCorner(final long pX0, final long pY0, final long pX1, final long pY1) {
          double min = Double.MAX_VALUE;
          int corner = 0;
          for (int i = 0 ; i < cornerX.length ; i ++) {
              final double distance = Distance.getSquaredDistanceToSegment(
                      cornerX[i], cornerY[i],
                      pX0, pY0, pX1, pY1);
              if (min > distance) {
                  min = distance;
                  corner = i;
              }
          }
          return corner;
      }