+0

# atan2(4,3)

0
602
7

atan2(4,3)

Guest Aug 19, 2015

#2
+19480
+13

atan2(4,3) ?

$$\mathbf{atan2}{(4,3)}=53.130102354156\ensurement{^{\circ}}\\ \Delta y = 4 \text{ and } \Delta x = 3$$

arctan with two parameters. see web2.0calculator. You can input like above.

heureka  Aug 19, 2015
#2
+19480
+13

atan2(4,3) ?

$$\mathbf{atan2}{(4,3)}=53.130102354156\ensurement{^{\circ}}\\ \Delta y = 4 \text{ and } \Delta x = 3$$

arctan with two parameters. see web2.0calculator. You can input like above.

heureka  Aug 19, 2015
#3
+26718
+10

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}{\left(\left({\mathtt{4}}\right), \left({\mathtt{3}}\right)\right)} = {\mathtt{53.130\: \!102\: \!354\: \!156^{\circ}}}$$  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}{\left(\left({\mathtt{3}}\right), \left({\mathtt{4}}\right)\right)} = {\mathtt{36.869\: \!897\: \!645\: \!844^{\circ}}}$$  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!

.

Alan  Aug 19, 2015
#5
+92623
+5

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)

Melody  Aug 19, 2015
#6
+19480
+8

atan2(4,3)

$$\small{ \begin{array}{lcl} \tan{(\alpha)} = \frac{a}{b} = \frac{\Delta y}{\Delta x}\\\\ \alpha = \mathbf{atan}{(\frac{a}{b}) }\\\\ \alpha =\mathbf{atan2} { ( a,b) } _{\text{in right quadrant}} =\mathbf{atan2}{ ( \text{numerator},\text{denominator} ) } =\mathbf{atan2}{ ( \Delta y,\Delta x ) }\\ \end{array} }$$

heureka  Aug 19, 2015
#7
+26718
+5

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!!

.

Alan  Aug 19, 2015
#8
+92623
0

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 :)

Melody  Aug 19, 2015
#9
+19480
+5

In general:

The choice of the parametres "a" and "b" determine the angel - orientation:

$$\\\small{\mathrm{atan2}{(\Delta y, \Delta x )} \quad \text{ angle counterclockwise direction start from 'x'-axis }}\\ \small{\mathrm{atan2}{(-\Delta y, \Delta x )} \quad \text{ angle clockwise direction start from 'x'-axis }}\\ \small{\mathrm{atan2}{(\Delta x, \Delta y )} \quad \text{ angle clockwise direction start from 'y'-axis }}\\ \small{\mathrm{atan2}{(-\Delta x, \Delta y )} \quad \text{ angle counterclockwise direction start from 'y'-axis }}\\$$

$$\\\small{\mathrm{atan2}{(\Delta y, -\Delta x )} \quad \text{ angle clockwise direction start from '-x'-axis }}\\ \small{\mathrm{atan2}{(-\Delta y, -\Delta x )} \quad \text{ angle counterclockwise direction start from '-x'-axis }}\\ \small{\mathrm{atan2}{(-\Delta x, -\Delta y )} \quad \text{ angle clockwise direction start from '-y'-axis }}\\ \small{\mathrm{atan2}{(\Delta x, -\Delta y )} \quad \text{ angle counterclockwise direction start from '-y'-axis }}\\$$

heureka  Aug 20, 2015