blob: 6ac2fd32fc906d42fecc44513ed2806fe8c0c0e1 [file] [log] [blame]
package com.airbnb.lottie;
import java.util.List;
import static com.airbnb.lottie.MiscUtils.lerp;
class FloatKeyframeAnimation extends KeyframeAnimation<Float> {
FloatKeyframeAnimation(List<Keyframe<Float>> keyframes) {
super(keyframes);
}
@Override Float getValue(Keyframe<Float> keyframe, float keyframeProgress) {
if (keyframe.startValue == null || keyframe.endValue == null) {
throw new IllegalStateException("Missing values for keyframe.");
}
return lerp(keyframe.startValue, keyframe.endValue, keyframeProgress);
}
}