package defpackage;

/* renamed from: ˈᵵᵢ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C1107 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public double f4771;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public double f4772;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public double f4773;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public boolean f4774;

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public double f4775;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public double f4776;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public double f4777;

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public final C2222 f4778;

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public double f4779;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public double f4780;

    public C1107() {
        this.f4776 = Math.sqrt(1500.0d);
        this.f4777 = 0.5d;
        this.f4774 = false;
        this.f4775 = Double.MAX_VALUE;
        this.f4778 = new C2222();
    }

    public C1107(float f) {
        this.f4776 = Math.sqrt(1500.0d);
        this.f4777 = 0.5d;
        this.f4774 = false;
        this.f4778 = new C2222();
        this.f4775 = f;
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final C2222 m3524(double d, double d2, long j) {
        double dSin;
        double dCos;
        if (!this.f4774) {
            if (this.f4775 == Double.MAX_VALUE) {
                ᵹˉᵞ.ᵳٴᵶ("Error: Final position of the spring must be set before the animation starts");
                return null;
            }
            double d3 = this.f4777;
            if (d3 > 1.0d) {
                double d4 = this.f4776;
                this.f4773 = (Math.sqrt((d3 * d3) - 1.0d) * d4) + ((-d3) * d4);
                double d5 = this.f4777;
                double d6 = this.f4776;
                this.f4772 = ((-d5) * d6) - (Math.sqrt((d5 * d5) - 1.0d) * d6);
            } else if (d3 >= 0.0d && d3 < 1.0d) {
                this.f4779 = Math.sqrt(1.0d - (d3 * d3)) * this.f4776;
            }
            this.f4774 = true;
        }
        double d7 = j / 1000.0d;
        double d8 = d - this.f4775;
        double d9 = this.f4777;
        if (d9 > 1.0d) {
            double d10 = this.f4772;
            double d11 = ((d10 * d8) - d2) / (d10 - this.f4773);
            double d12 = d8 - d11;
            dSin = (Math.pow(2.718281828459045d, this.f4773 * d7) * d11) + (Math.pow(2.718281828459045d, d10 * d7) * d12);
            double d13 = this.f4772;
            double dPow = Math.pow(2.718281828459045d, d13 * d7) * d12 * d13;
            double d14 = this.f4773;
            dCos = (Math.pow(2.718281828459045d, d14 * d7) * d11 * d14) + dPow;
        } else if (d9 == 1.0d) {
            double d15 = this.f4776;
            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.f4776) * d7) * d17;
            double d18 = -this.f4776;
            dCos = (Math.pow(2.718281828459045d, d18 * d7) * d16) + (dPow3 * d18);
            dSin = dPow2;
        } else {
            double d19 = 1.0d / this.f4779;
            double d20 = this.f4776;
            double d21 = ((d9 * d20 * d8) + d2) * d19;
            dSin = ((Math.sin(this.f4779 * d7) * d21) + (Math.cos(this.f4779 * d7) * d8)) * Math.pow(2.718281828459045d, (-d9) * d20 * d7);
            double d22 = this.f4776;
            double d23 = this.f4777;
            double d24 = (-d22) * dSin * d23;
            double dPow4 = Math.pow(2.718281828459045d, (-d23) * d22 * d7);
            double d25 = this.f4779;
            double dSin2 = Math.sin(d25 * d7) * (-d25) * d8;
            double d26 = this.f4779;
            dCos = (((Math.cos(d26 * d7) * d21 * d26) + dSin2) * dPow4) + d24;
        }
        float f = (float) (dSin + this.f4775);
        C2222 c2222 = this.f4778;
        c2222.f8734 = f;
        c2222.f8735 = (float) dCos;
        return c2222;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void m3525(float f) {
        if (f < 0.0f) {
            ᵹˉᵞ.ˌᵜᵹᵩ("Damping ratio must be non-negative");
        } else {
            this.f4777 = f;
            this.f4774 = false;
        }
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final void m3526(float f) {
        if (f <= 0.0f) {
            ᵹˉᵞ.ˌᵜᵹᵩ("Spring stiffness constant must be positive.");
        } else {
            this.f4776 = Math.sqrt(f);
            this.f4774 = false;
        }
    }
}
