40 #ifndef __EST_COMPLEX_H__ 
   41 #define __EST_COMPLEX_H__ 
   49 #define PI 3.14159265358979323846 
   69     { r = real; i = imag;}
 
   74     { 
return(sqrt(r*r+i*i)); }
 
   77     double ang(
int degrees=0)
 const {
 
   79     if ( r == 0. && i == 0. ) a = 0.0;
 
   80     else if ( r >= 0. ) a = atan(i/r);
 
   81     else if ( i >= 0. ) a = atan(i/r) + PI;
 
   82     else a = atan(i/r) - PI;
 
   83     return (degrees == 1) ? (a * 180 / PI) : a;
 
  105 friend ostream& operator<< (ostream& s,  
const EST_Complex& a)
 
  106 { s << a.r << 
" " << a.i; 
return s;}