Math.atan2 porque tiene los argumentos al contrario?

(1/1)

patilanz:
Alguien tiene una idea porque la función de Math.atan2 tiene los argumentos y,x y no x,y como las demás funciones parecidas?

Un saludo

MinusFour:
No es solo de javascript:

Citar

Note that it is intentional and traditional for the two-argument arc tangent function that the argument named y be first and the argument named x be second.

En muchas otras librerias hacen eso. Realmente, importa poco el orden aunque es cierto lo que dicen aqui:

https://stackoverflow.com/questions/1045630/why-are-the-arguments-to-atan2-y-x-rather-than-x-y

I.e.:

Tangente = Cateto Opuesto (Y) / Cateto Adyacente (X)

Navegación

[0] Índice de Mensajes