code: public int increase(double extrp, int increase)
      {
          final int current = getCurrent();
          final double increased = current + increase * extrp;
          set(increased);
          if (increased > max)
          {
              return max - current;
          }
          return increase;
      }
docs: Increase current value. The current value will not exceed the maximum.
  
  @param extrp The extrapolation value.
  @param increase The increase step.
  @return The increased value (equal to increase in normal case, lower in other case).