I am coding a simple DFT algorithm now and I want to use the complex number i in complex exponential. I saw somebody use #include and #include&
#include
#include&
You can find details here
A simple approach would be
#include using std::complex; const double pi = 3.1415; void foo() { complex val(polar(1, pi/2.0); Create a complex from its olar representation }