User:Pantheo1946/sandbox

Directions a)from 0 to 2pi   1)atan(x,y)     2)atan(E,N)   and b)from -pi to +pi  atan2(x,y) 1)atan(x,y)=pi-pi/2*(1+sgn(x))*(1-sgn(y^2))-pi/4*(2+sgn(x))*sgn(y)-sgn(x*y)*atan((abs(x)-abs(y))/(abs(x)+abs(y)))           when  x=x2-x1  and y=y2-y1 2)atan(E,N)=pi-pi/2*(1+sgn(N))*(1-sgn(E^2))-pi/4*(2+sgn(N))*sgn(E)-sgn(N*E)*atan((abs(N)-abs(E))/(abs(N)+abs(E))) when N=N2-N1  and E=E2-E1

3)atan2(x,y)=pi/2*(1-sgn(x))*(1-sgn(y^2))+pi/4*(2-sgn(x))*sgn(y)-sgn(x*y)*atan((abs(x)-abs(y))/(abs(x)+abs(y)))

when x=x2-x1 and y=y2-y1