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?
y, x
x, y
Because it's similar to atan(y / x), with y as numerator and x as denominator.
atan(y / x)
y
x
Probably because atan2(y,x) = atan(y/x) ± nπ and here, y and x come in the same order.
atan2(y,x) = atan(y/x) ± nπ