Prototypes | Header File(s) | |
RWMathVec<double> |
real(const RWMathVec<DComplex>&) |
<rw/math/mathvec.h> |
RWGenMat<double> |
real(const RWGenMat<DComplex>&) |
<rw/math/genmat.h> |
RWMathArray<double> |
real(const RWMathArray<DComplex>&) |
<rw/math/mtharray.h> |
Takes a complex argument x and returns real y containing the real part yi = Re(xi). With most versions of complex, the results can be used as an lvalue:
RWMathVec<DComplex> v(5, 0); // (0, 0), (0, 0), ... real(v) = 1.0; // (1, 0), (1, 0), ...