code: private float getHeight(float[] left, float[] right) {
          float max = Float.MIN_VALUE;
          float min = Float.MAX_VALUE;
          for (int i = 0; i < left.length; i += 2) {
              min = Math.min(min, left[i + 1]);
              max = Math.max(max, left[i + 1]);
          }
          for (int i = 0; i < right.length; i += 2) {
              min = Math.min(min, right[i + 1]);
              max = Math.max(max, right[i + 1]);
          }
          return max - min;
      }
docs: Figure out the height of a column from the border extents
  
  @param left  left border
  @param right right border
  @return height