docs: private void crossSegmentShadowLine(
              int shadowx, int shadowy,
              int sx0, int sy0,
              int sx1, int sy1,
              boolean isMax) {
          if (shadowy < sy0 && shadowy < sy1) {
              // Segment is entirely at the top of the shadow line
              return;
          }
          if (shadowy > sy0 && shadowy > sy1) {
              // Segment is entirely at the bottom of the shadow line
              return;
          }
          if (shadowx > sx0 && shadowx > sx1) {
              // Segment is entirely at the left of the shadow line
              return;
          }
          // Compute the intersection point between the segment and the shadow line
          final int xintercept = (int) Math.round((double) sx0 + (shadowy - sy0) * (sx1 - sx0) / (sy1 - sy0));
          if (shadowx > xintercept) {
              // The intersection point is on the left of the shadow line.
              return;
          }
          if (isMax) {
              setCrossingCoordinateForYMax(xintercept, shadowy);
          } else {
              setCrossingCoordinateForYMin(xintercept, shadowy);
          }
          if (sy0 < sy1) {
              ++this.crossings;
          } else {
              --this.crossings;
          }
      }