code: public static float reduce(float startValue, float endValue, float time) {
          if (startValue < endValue)
              throw new IllegalArgumentException("End size can't be larger than start size.");
          return endValue + (startValue - endValue) * (1 - time);
      }
docs: Reduce value from startValue to endValue
  
  @param startValue start size
  @param endValue   end size
  @param time       time of animation
  @return new size value