Struct std::Complex
struct Complex {
double re;
double im;
}Fields
Methods
negate — SafeC operator overloads aren't distinguished by arity, so unary '-' can't share the 'operator-' name with binary subtraction above
magnitude: sqrt(re^2 + im^2)
phase angle: atan2(im, re)
complex conjugate: (re, -im)
magnitude * e^(i*theta) = magnitude * (cos(theta), sin(theta)) — the form FFT twiddle factors and oscillator/DFT kernels are naturally expressed in.