package defpackage;

/* JADX INFO: renamed from: ᵼʽˉˊ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C5256 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public double f19806;

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public double f19807;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public boolean f19808;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public double f19809;

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final C0479 f19810;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public double f19811;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public double f19812;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public double f19813;

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public double f19814;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public double f19815;

    public C5256() {
        this.f19811 = Math.sqrt(1500.0d);
        this.f19806 = 0.5d;
        this.f19808 = false;
        this.f19814 = Double.MAX_VALUE;
        this.f19810 = new C0479();
    }

    public C5256(float f) {
        this.f19811 = Math.sqrt(1500.0d);
        this.f19806 = 0.5d;
        this.f19808 = false;
        this.f19810 = new C0479();
        this.f19814 = f;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final void m10826(float f) {
        if (f <= 0.0f) {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ("Spring stiffness constant must be positive.");
        } else {
            this.f19811 = Math.sqrt(f);
            this.f19808 = false;
        }
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final C0479 m10827(double d, double d2, long j) {
        double dSin;
        double dCos;
        if (!this.f19808) {
            if (this.f19814 == Double.MAX_VALUE) {
                ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Error: Final position of the spring must be set before the animation starts");
                return null;
            }
            double d3 = this.f19806;
            if (d3 > 1.0d) {
                double d4 = this.f19811;
                this.f19815 = (Math.sqrt((d3 * d3) - 1.0d) * d4) + ((-d3) * d4);
                double d5 = this.f19806;
                double d6 = this.f19811;
                this.f19812 = ((-d5) * d6) - (Math.sqrt((d5 * d5) - 1.0d) * d6);
            } else if (d3 >= 0.0d && d3 < 1.0d) {
                this.f19807 = Math.sqrt(1.0d - (d3 * d3)) * this.f19811;
            }
            this.f19808 = true;
        }
        double d7 = j / 1000.0d;
        double d8 = d - this.f19814;
        double d9 = this.f19806;
        if (d9 > 1.0d) {
            double d10 = this.f19812;
            double d11 = ((d10 * d8) - d2) / (d10 - this.f19815);
            double d12 = d8 - d11;
            dSin = (Math.pow(2.718281828459045d, this.f19815 * d7) * d11) + (Math.pow(2.718281828459045d, d10 * d7) * d12);
            double d13 = this.f19812;
            double dPow = Math.pow(2.718281828459045d, d13 * d7) * d12 * d13;
            double d14 = this.f19815;
            dCos = (Math.pow(2.718281828459045d, d14 * d7) * d11 * d14) + dPow;
        } else if (d9 == 1.0d) {
            double d15 = this.f19811;
            double d16 = (d15 * d8) + d2;
            double d17 = (d16 * d7) + d8;
            double dPow2 = Math.pow(2.718281828459045d, (-d15) * d7) * d17;
            double dPow3 = Math.pow(2.718281828459045d, (-this.f19811) * d7) * d17;
            double d18 = -this.f19811;
            dCos = (Math.pow(2.718281828459045d, d18 * d7) * d16) + (dPow3 * d18);
            dSin = dPow2;
        } else {
            double d19 = 1.0d / this.f19807;
            double d20 = this.f19811;
            double d21 = ((d9 * d20 * d8) + d2) * d19;
            dSin = ((Math.sin(this.f19807 * d7) * d21) + (Math.cos(this.f19807 * d7) * d8)) * Math.pow(2.718281828459045d, (-d9) * d20 * d7);
            double d22 = this.f19811;
            double d23 = this.f19806;
            double d24 = (-d22) * dSin * d23;
            double dPow4 = Math.pow(2.718281828459045d, (-d23) * d22 * d7);
            double d25 = this.f19807;
            double dSin2 = Math.sin(d25 * d7) * (-d25) * d8;
            double d26 = this.f19807;
            dCos = (((Math.cos(d26 * d7) * d21 * d26) + dSin2) * dPow4) + d24;
        }
        float f = (float) (dSin + this.f19814);
        C0479 c0479 = this.f19810;
        c0479.f2571 = f;
        c0479.f2570 = (float) dCos;
        return c0479;
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m10828(float f) {
        if (f < 0.0f) {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ("Damping ratio must be non-negative");
        } else {
            this.f19806 = f;
            this.f19808 = false;
        }
    }
}
