Prototypes | Header File(s) | |
RWMathVec<DComplex> |
rootsOfOne(int N, unsigned nterms) |
<rw/math/mathvec.h> |
RWMathVec<DComplex> |
rootsOfOne(int N) |
<rw/math/mathvec.h> |
Returns a complex vector v containing the complex Nth roots of unity, that is:
If rootsOfOne() is invoked with argument (N), the N roots are returned in a vector of type RWMathVec<DComplex> with N elements. If rootsOfOne() is invoked with arguments (N, nterms), only the first nterms roots are returned.