code: private float adaptToStepSize(final float value) {
          if (getStepSize() > 0) {
              float offset = value - getMinValue();
              float mod = offset % getStepSize();
              float halfStepSize = (float) getStepSize() / 2.0f;
              float result = ((mod > halfStepSize) ? offset + getStepSize() - mod : offset - mod) +
                      getMinValue();
              return Math.min(result, getMaxValue());
          }
  
          return value;
      }
docs: Adapts a specific value to the step size, which is currently set. The value will be decreased
  or increased to the numerically closest value, which matches the step size.
  
  @param value
  The value, which should be adapted to the step size, as a {@link Float} value
  @return The adapted value as a {@link Float} value