what-the-bank/sources/o/IVy.java

200 lines
5.7 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
/* loaded from: classes.dex */
public final class IVy implements JLJ {
private int b;
private float d;
public float e;
private float f;
private float g;
private float h;
private float i;
private float j;
private float k;
private float l;
private String m;
private float n;
/* renamed from: o, reason: collision with root package name */
private float f8210o;
public boolean a = false;
public boolean c = false;
@Override // o.JLJ
public final float c() {
return this.a ? -c(this.d) : c(this.d);
}
@Override // o.JLJ
public final boolean b() {
return c() < 1.0E-5f && Math.abs(this.l - this.d) < 1.0E-5f;
}
public final void e(float f, float f2, float f3, float f4, float f5) {
this.c = false;
if (f == BitmapDescriptorFactory.HUE_RED) {
f = 1.0E-4f;
}
this.j = f;
float f6 = f / f3;
float f7 = (f6 * f) / 2.0f;
if (f < BitmapDescriptorFactory.HUE_RED) {
float sqrt = (float) Math.sqrt((f2 - ((((-f) / f3) * f) / 2.0f)) * f3);
if (sqrt < f4) {
this.m = "backward accelerate, decelerate";
this.b = 2;
this.j = f;
this.k = sqrt;
this.n = BitmapDescriptorFactory.HUE_RED;
float f8 = (sqrt - f) / f3;
this.f = f8;
this.i = sqrt / f3;
this.g = ((f + sqrt) * f8) / 2.0f;
this.h = f2;
this.l = f2;
return;
}
this.m = "backward accelerate cruse decelerate";
this.b = 3;
this.j = f;
this.k = f4;
this.n = f4;
float f9 = (f4 - f) / f3;
this.f = f9;
float f10 = f4 / f3;
this.f8210o = f10;
float f11 = ((f + f4) * f9) / 2.0f;
float f12 = (f10 * f4) / 2.0f;
this.i = ((f2 - f11) - f12) / f4;
this.g = f11;
this.h = f2 - f12;
this.l = f2;
return;
}
if (f7 >= f2) {
this.m = "hard stop";
this.b = 1;
this.j = f;
this.k = BitmapDescriptorFactory.HUE_RED;
this.g = f2;
this.f = (2.0f * f2) / f;
return;
}
float f13 = f2 - f7;
float f14 = f13 / f;
if (f14 + f6 < f5) {
this.m = "cruse decelerate";
this.b = 2;
this.j = f;
this.k = f;
this.n = BitmapDescriptorFactory.HUE_RED;
this.g = f13;
this.h = f2;
this.f = f14;
this.i = f6;
return;
}
float sqrt2 = (float) Math.sqrt((f3 * f2) + ((f * f) / 2.0f));
float f15 = (sqrt2 - f) / f3;
this.f = f15;
float f16 = sqrt2 / f3;
this.i = f16;
if (sqrt2 < f4) {
this.m = "accelerate decelerate";
this.b = 2;
this.j = f;
this.k = sqrt2;
this.n = BitmapDescriptorFactory.HUE_RED;
this.f = f15;
this.i = f16;
this.g = ((f + sqrt2) * f15) / 2.0f;
this.h = f2;
return;
}
this.m = "accelerate cruse decelerate";
this.b = 3;
this.j = f;
this.k = f4;
this.n = f4;
float f17 = (f4 - f) / f3;
this.f = f17;
float f18 = f4 / f3;
this.f8210o = f18;
float f19 = ((f + f4) * f17) / 2.0f;
float f20 = (f18 * f4) / 2.0f;
this.i = ((f2 - f19) - f20) / f4;
this.g = f19;
this.h = f2 - f20;
this.l = f2;
}
@Override // o.JLJ
public final float a(float f) {
float f2;
this.c = false;
float f3 = this.f;
if (f <= f3) {
float f4 = this.j;
f2 = (f4 * f) + ((((this.k - f4) * f) * f) / (f3 * 2.0f));
} else {
int i = this.b;
if (i == 1) {
f2 = this.g;
} else {
float f5 = f - f3;
float f6 = this.i;
if (f5 < f6) {
float f7 = this.g;
float f8 = this.k;
f2 = f7 + (f8 * f5) + ((((this.n - f8) * f5) * f5) / (f6 * 2.0f));
} else if (i == 2) {
f2 = this.h;
} else {
float f9 = f5 - f6;
float f10 = this.f8210o;
if (f9 <= f10) {
float f11 = this.h;
float f12 = this.n * f9;
f2 = (f11 + f12) - ((f12 * f9) / (f10 * 2.0f));
} else {
this.c = true;
f2 = this.l;
}
}
}
}
this.d = f;
return this.a ? this.e - f2 : this.e + f2;
}
private float c(float f) {
float f2 = this.f;
if (f <= f2) {
float f3 = this.j;
return f3 + (((this.k - f3) * f) / f2);
}
int i = this.b;
if (i == 1) {
return BitmapDescriptorFactory.HUE_RED;
}
float f4 = f - f2;
float f5 = this.i;
if (f4 < f5) {
float f6 = this.k;
return f6 + (((this.n - f6) * f4) / f5);
}
if (i == 2) {
return this.h;
}
float f7 = f4 - f5;
float f8 = this.f8210o;
if (f7 >= f8) {
return this.l;
}
float f9 = this.n;
return f9 - ((f7 * f9) / f8);
}
}