docs: public static double snapToTicks(final double MIN_VALUE, final double MAX_VALUE, final double VALUE, final int MINOR_TICK_COUNT, final double MAJOR_TICK_UNIT) {
          double v = VALUE;
          int    minorTickCount = clamp(0, 10, MINOR_TICK_COUNT);
          double majorTickUnit  = Double.compare(MAJOR_TICK_UNIT, 0.0) <= 0 ? 0.25 : MAJOR_TICK_UNIT;
          double tickSpacing;
  
          if (minorTickCount != 0) {
              tickSpacing = majorTickUnit / (Math.max(minorTickCount, 0) + 1);
          } else {
              tickSpacing = majorTickUnit;
          }
  
          int    prevTick      = (int) ((v - MIN_VALUE) / tickSpacing);
          double prevTickValue = prevTick * tickSpacing + MIN_VALUE;
          double nextTickValue = (prevTick + 1) * tickSpacing + MIN_VALUE;
  
          v = nearest(prevTickValue, v, nextTickValue);
  
          return clamp(MIN_VALUE, MAX_VALUE, v);
      }