atan2(4,3) ?
atan2(4,3)=53.130102354156\ensurement∘Δy=4 and Δx=3
arctan with two parameters. see web2.0calculator. You can input like above.
In some computer languages atan2(x,y) returns the angle between the origin and point (x,y), with the value returned being between ±180°. In the calculator here, atan2(y,x) returns the angle between (x,y) and the origin.
So here:
atan2((4),(3))=53.130102354156∘ This is the angle whose y-component is 4 and whose x-component is 3
However, in Mathcad, for example atan2(4,3) = 36.87° which matches:
atan2((3),(4))=36.869897645844∘ This is the angle whose x-component is 4 and whose y-component is 3.
The desired result depends on which is x and which is y. Only the poster will know!
.
Thank you Alan, that makes good sense. I have not seen it before :))
The numbers being the wrong way around is confusing.
I wonder why Mr Massow did that ? (surely it is not normal)
atan2(4,3)
tan(α)=ab=ΔyΔxα=atan(ab)α=atan2(a,b)in right quadrant=atan2(numerator,denominator)=atan2(Δy,Δx)
It's not a question of right or wrong, it's just a convention. Mathcad and Excel, for example do it one way; Matlab and webcalc2.0 do it the other way (so Andre Massow is in good company, choosing to do it that way!).
It is important to know which convention the piece of software/calculator you are using has chosen, of course!!
.
Thanks Alan, yes it is about convention and now Heureka has explained it I can see that there is a really good reason to do it this way around. Thanks Heureka for explaining it :)
In general:
The choice of the parametres "a" and "b" determine the angel - orientation:
atan2(Δy,Δx) angle counterclockwise direction start from 'x'-axis atan2(−Δy,Δx) angle clockwise direction start from 'x'-axis atan2(Δx,Δy) angle clockwise direction start from 'y'-axis atan2(−Δx,Δy) angle counterclockwise direction start from 'y'-axis
atan2(Δy,−Δx) angle clockwise direction start from '-x'-axis atan2(−Δy,−Δx) angle counterclockwise direction start from '-x'-axis atan2(−Δx,−Δy) angle clockwise direction start from '-y'-axis atan2(Δx,−Δy) angle counterclockwise direction start from '-y'-axis