discord-jadx/app/src/main/java/androidx/vectordrawable/graphics/drawable/ArgbEvaluator.java

32 lines
1.6 KiB
Java

package androidx.vectordrawable.graphics.drawable;
import android.animation.TypeEvaluator;
import androidx.annotation.RestrictTo;
import b.d.b.a.a;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
/* loaded from: classes.dex */
public class ArgbEvaluator implements TypeEvaluator {
private static final ArgbEvaluator sInstance = new ArgbEvaluator();
public static ArgbEvaluator getInstance() {
return sInstance;
}
@Override // android.animation.TypeEvaluator
public Object evaluate(float f, Object obj, Object obj2) {
int intValue = ((Integer) obj).intValue();
float f2 = ((intValue >> 24) & 255) / 255.0f;
int intValue2 = ((Integer) obj2).intValue();
float pow = (float) Math.pow(((intValue >> 16) & 255) / 255.0f, 2.2d);
float pow2 = (float) Math.pow(((intValue >> 8) & 255) / 255.0f, 2.2d);
float pow3 = (float) Math.pow((intValue & 255) / 255.0f, 2.2d);
float pow4 = (float) Math.pow(((intValue2 >> 16) & 255) / 255.0f, 2.2d);
float a = a.a(((intValue2 >> 24) & 255) / 255.0f, f2, f, f2);
float a2 = a.a(pow4, pow, f, pow);
float a3 = a.a((float) Math.pow(((intValue2 >> 8) & 255) / 255.0f, 2.2d), pow2, f, pow2);
float a4 = a.a((float) Math.pow((intValue2 & 255) / 255.0f, 2.2d), pow3, f, pow3);
int round = Math.round(((float) Math.pow(a2, 0.45454545454545453d)) * 255.0f) << 16;
return Integer.valueOf(Math.round(((float) Math.pow(a4, 0.45454545454545453d)) * 255.0f) | round | (Math.round(a * 255.0f) << 24) | (Math.round(((float) Math.pow(a3, 0.45454545454545453d)) * 255.0f) << 8));
}
}