mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-18 03:47:18 +01:00
33 lines
1.6 KiB
Java
33 lines
1.6 KiB
Java
package com.google.android.material.animation;
|
|
|
|
import android.animation.TimeInterpolator;
|
|
import android.view.animation.DecelerateInterpolator;
|
|
import android.view.animation.LinearInterpolator;
|
|
import androidx.annotation.RestrictTo;
|
|
import androidx.biometric.ErrorUtils$$ExternalSyntheticOutline0;
|
|
import androidx.interpolator.view.animation.FastOutLinearInInterpolator;
|
|
import androidx.interpolator.view.animation.FastOutSlowInInterpolator;
|
|
import androidx.interpolator.view.animation.LinearOutSlowInInterpolator;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
|
|
/* loaded from: classes7.dex */
|
|
public class AnimationUtils {
|
|
public static final TimeInterpolator LINEAR_INTERPOLATOR = new LinearInterpolator();
|
|
public static final TimeInterpolator FAST_OUT_SLOW_IN_INTERPOLATOR = new FastOutSlowInInterpolator();
|
|
public static final TimeInterpolator FAST_OUT_LINEAR_IN_INTERPOLATOR = new FastOutLinearInInterpolator();
|
|
public static final TimeInterpolator LINEAR_OUT_SLOW_IN_INTERPOLATOR = new LinearOutSlowInInterpolator();
|
|
public static final TimeInterpolator DECELERATE_INTERPOLATOR = new DecelerateInterpolator();
|
|
|
|
public static float lerp(float f, float f2, float f3, float f4, float f5) {
|
|
return f5 <= f3 ? f : f5 >= f4 ? f2 : lerp(f, f2, (f5 - f3) / (f4 - f3));
|
|
}
|
|
|
|
public static int lerp(int i, int i2, float f) {
|
|
return Math.round(f * (i2 - i)) + i;
|
|
}
|
|
|
|
public static float lerp(float f, float f2, float f3) {
|
|
return ErrorUtils$$ExternalSyntheticOutline0.m(f2, f, f3, f);
|
|
}
|
|
}
|