23 #include <tjutils/tjutils.h>
24 #include <tjutils/tjstring.h>
35 STD_string
ctos(
const STD_complex& z);
40 STD_complex
stoc(
const STD_string& s);
46 inline STD_complex float2real(
float a) {
return STD_complex(a,0.0f);}
47 inline STD_complex float2imag(
float b) {
return STD_complex(0.0f,b);}
48 inline float creal(STD_complex c) {
return c.real();}
49 inline float cimag(STD_complex c) {
return c.imag();}
50 inline float cabs(STD_complex c) {
return float(sqrt(c.real()*c.real()+c.imag()*c.imag()));}
51 inline float phase(STD_complex c) {
return STD_arg(c);}
52 inline STD_complex logc(STD_complex c) {
return STD_log(c);}
53 inline STD_complex expc(STD_complex c) {
return STD_exp(c);}
54 inline STD_complex conjc(STD_complex c) {
return STD_conj(c);}
61 inline bool operator < (
const STD_complex& c1,
const STD_complex& c2) {
return STD_abs(c1)<STD_abs(c2);}
66 inline bool operator > (
const STD_complex& c1,
const STD_complex& c2) {
return STD_abs(c1)>STD_abs(c2);}
bool operator>(const STD_complex &c1, const STD_complex &c2)
STD_string ctos(const STD_complex &z)
bool operator<(const STD_complex &c1, const STD_complex &c2)
fvector phase(const cvector &cv)
STD_complex stoc(const STD_string &s)