public complex pow(uint pow) { complex cmplx = new complex(); cmplx._real = Math.Pow(this.norm(), pow) * Math.Cos(pow * this.angle()); cmplx._imaginary = Math.Pow(this.norm(), pow) * Math.Sin(pow * this.angle()); return(cmplx); }
public static complex operator /(complex c1, complex c2) { complex cmplx = new complex(); cmplx._real = (c1._real * c2._real + c1._imaginary * c2._imaginary) / (Math.Pow(c2._real, 2) + Math.Pow(c2._imaginary, 2)); cmplx._imaginary = (c1._imaginary * c2._real - c1._real * c2._imaginary) / (Math.Pow(c2._real, 2) + Math.Pow(c2._imaginary, 2)); return(cmplx); }
public complex conjugate() { complex cmplx = new complex(); cmplx._real = this._real; cmplx._imaginary = (-1) * this._imaginary; return(cmplx); }
public static complex operator *(complex c1, complex c2) { complex cmplx = new complex(); cmplx._real = c1._real * c2._real - c1._imaginary * c2._imaginary; cmplx._imaginary = c1._imaginary * c2._real + c1._real * c2._imaginary; return(cmplx); }