/*
 * Decompiled with CFR 0_132.
 */
package DFT;

import DFT.Complex;

public class Phasor {
    private float M;
    private float A;

    public Phasor() {
        this.M = 0.0f;
        this.A = 0.0f;
    }

    public Phasor(float m, float a) {
        this.M = m;
        this.A = a;
    }

    public Phasor(Complex c) {
        this.M = c.mag();
        this.A = c.angle();
    }

    public void mag(float m) {
        this.M = m;
    }

    public float mag() {
        return this.M;
    }

    public void angle(float a) {
        this.A = a;
    }

    public float angle() {
        return this.A;
    }

    public Complex cx() {
        double radA = (double)this.A * 3.141592653589793 / 180.0;
        double R = Math.cos(radA) * (double)this.M;
        double I = Math.sin(radA) * (double)this.M;
        Complex c = new Complex((float)R, (float)I);
        return c;
    }
}

