Software Archive
Read-only legacy content
17061 Discussions

ATAN within [0,2pi)

Intel_C_Intel
Employee
834 Views
I want to take the arctangent of y/x, with the output in the range [0,2pi). Is there a more elegant way than using

angle = AMOD(ATAN2(y,x)+TWOPI,TWOPI)

where I have defined TWOPI as a parameter?
0 Kudos
1 Reply
Intel_C_Intel
Employee
834 Views
0.5*TWOPI-ATAN2(Y,-X)
0 Kudos
Reply