# Clockwise vs counterclockwise. What's with the DFT?

I had an algorithms tutorial today and I realized that many of my answers were incorrect, but any time I took the DFT and then DFT^-1 to find some real roots of a polynomial, I had the correct answer.

What I'm wondering is, why does my algorithms textbook define the nth roots of unity differently than, for example wikipedia and wolfram math world define it?

My textbook: Introduction to Algorithms, 3rd Edition

nth roots of unity: $e^{2\pi i\frac{k}{n}}$

Wikiedia, Wolfram Math World:

nth roots of unity: $e^{-2\pi i\frac{k}{n}}$

My question is, would complex roots of a polynomial turn out incorrect when calculated with this slightly different definition? What else should I look for? I'm sure it's different because the textbook even offers a roots of unity circle which counts upwards in the counter-clockwise direction (eg $\omega_4^1 = i$ instead of $-i$)

Regards,

Mathworld, too presents only the form $e^{2\pi ik/n}$.