78 lines
2.2 KiB
Java
78 lines
2.2 KiB
Java
package o;
|
|
|
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class Nsp implements JLJ {
|
|
public double c;
|
|
public float d;
|
|
public float f;
|
|
public float g;
|
|
public double h;
|
|
public float i;
|
|
public double j;
|
|
private float n;
|
|
public double b = 0.5d;
|
|
public boolean a = false;
|
|
public int e = 0;
|
|
|
|
@Override // o.JLJ
|
|
public final float c() {
|
|
return BitmapDescriptorFactory.HUE_RED;
|
|
}
|
|
|
|
@Override // o.JLJ
|
|
public final float a(float f) {
|
|
Nsp nsp = this;
|
|
float f2 = f;
|
|
double d = f2 - nsp.d;
|
|
double d2 = nsp.h;
|
|
double d3 = nsp.b;
|
|
int sqrt = (int) ((9.0d / ((Math.sqrt(d2 / nsp.i) * d) * 4.0d)) + 1.0d);
|
|
double d4 = d / sqrt;
|
|
int i = 0;
|
|
while (i < sqrt) {
|
|
double d5 = nsp.g;
|
|
double d6 = nsp.j;
|
|
int i2 = sqrt;
|
|
int i3 = i;
|
|
double d7 = nsp.n;
|
|
double d8 = nsp.i;
|
|
double d9 = ((((((-d2) * (d5 - d6)) - (d7 * d3)) / d8) * d4) / 2.0d) + d7;
|
|
double d10 = ((((-((d5 + ((d4 * d9) / 2.0d)) - d6)) * d2) - (d9 * d3)) / d8) * d4;
|
|
double d11 = d10 / 2.0d;
|
|
float f3 = (float) (d10 + d7);
|
|
this.n = f3;
|
|
float f4 = (float) (d5 + ((d7 + d11) * d4));
|
|
this.g = f4;
|
|
int i4 = this.e;
|
|
if (i4 > 0) {
|
|
if (f4 < BitmapDescriptorFactory.HUE_RED && (i4 & 1) == 1) {
|
|
this.g = -f4;
|
|
this.n = -f3;
|
|
}
|
|
float f5 = this.g;
|
|
if (f5 > 1.0f && (i4 & 2) == 2) {
|
|
this.g = 2.0f - f5;
|
|
this.n = -this.n;
|
|
}
|
|
}
|
|
i = i3 + 1;
|
|
f2 = f;
|
|
nsp = this;
|
|
sqrt = i2;
|
|
}
|
|
Nsp nsp2 = nsp;
|
|
nsp2.d = f2;
|
|
return nsp2.g;
|
|
}
|
|
|
|
@Override // o.JLJ
|
|
public final boolean b() {
|
|
double d = this.g - this.j;
|
|
double d2 = this.h;
|
|
double d3 = this.n;
|
|
return Math.sqrt((((d3 * d3) * ((double) this.i)) + ((d2 * d) * d)) / d2) <= ((double) this.f);
|
|
}
|
|
}
|