Alex Rivera | Logout

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

Asked 2010-09-30T15:51:18.037
16

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?

Edit
Report

2 Answers

16

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

answered 2010-09-30T15:53:15.270
8

Probably because atan2(y,x) = atan(y/x) ± nπ and here, y and x come in the same order.

answered 2010-09-30T15:54:35.393

Your Answer