Skip to content
Prev 67661 / 398506 Next

Strange behavior of atan2

Cl?ment Calenge <calenge at biomserv.univ-lyon1.fr> writes:
Yes, it is expected. R just copies what the C library function does,
but there is actually a rationale:

http://www-sbras.nsc.ru/cgi-bin/www/unix_help/unix-man?atan2+3

Briefly: You don't get a natural conversion to spherical coordinates
and back without this convention.