docs: private static double constrainNum(double min, double size, double h) {
  
          if (h < min) {
              return min;
          }
          if (h >= (min + size)) {
              return (min + size) - 1;
          }
          return h;
      }