You can simply use atan2( vect.y, vect.x ). Note that this is equivalent to
atan( vect.y / vect.x ) but avoids the problem of division by zero.
This will give you the angle in radians. If you want it in degrees, use
degrees( atan2( vect.y, vect.x ) ).
- Slime
[ http://www.slimeland.com/ ]