docs: private float crossCheckHorizontal(int startJ, int centerI, int maxCount,
        int originalStateCountTotal) {
      BitMatrix image = this.image;
  
      int maxJ = image.getWidth();
      int[] stateCount = getCrossCheckStateCount();
  
      int j = startJ;
      while (j >= 0 && image.get(j, centerI)) {
        stateCount[2]++;
        j--;
      }
      if (j < 0) {
        return Float.NaN;
      }
      while (j >= 0 && !image.get(j, centerI) && stateCount[1] <= maxCount) {
        stateCount[1]++;
        j--;
      }
      if (j < 0 || stateCount[1] > maxCount) {
        return Float.NaN;
      }
      while (j >= 0 && image.get(j, centerI) && stateCount[0] <= maxCount) {
        stateCount[0]++;
        j--;
      }
      if (stateCount[0] > maxCount) {
        return Float.NaN;
      }
  
      j = startJ + 1;
      while (j < maxJ && image.get(j, centerI)) {
        stateCount[2]++;
        j++;
      }
      if (j == maxJ) {
        return Float.NaN;
      }
      while (j < maxJ && !image.get(j, centerI) && stateCount[3] < maxCount) {
        stateCount[3]++;
        j++;
      }
      if (j == maxJ || stateCount[3] >= maxCount) {
        return Float.NaN;
      }
      while (j < maxJ && image.get(j, centerI) && stateCount[4] < maxCount) {
        stateCount[4]++;
        j++;
      }
      if (stateCount[4] >= maxCount) {
        return Float.NaN;
      }
  
      // If we found a finder-pattern-like section, but its size is significantly different than
      // the original, assume it's a false positive
      int stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + stateCount[3] +
          stateCount[4];
      if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= originalStateCountTotal) {
        return Float.NaN;
      }
  
      return foundPatternCross(stateCount) ? centerFromEnd(stateCount, j) : Float.NaN;
    }