Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are the parameters to `atan2` “backwards”?

Tags:

math

Why is it that the parameters to the atan2 function are “backwards”? Ie, why does it accepts coordinates in the form y, x instead of the standard x, y?

like image 508
David Wolever Avatar asked Sep 30 '10 15:09

David Wolever


1 Answers

Because it's similar to atan(y / x), with y as numerator and x as denominator.

like image 200
Sheldon L. Cooper Avatar answered Oct 14 '22 05:10

Sheldon L. Cooper