What does "atan2(value1, value2)" mean???
What does "atan2(value1, value2)" mean???
(OP)
I'm trying to apply a function, in MS Excel, posted on the internet from mathcad.
Somewhere it says that "value=atan2(value1, value2)"
I don't get it...
It can't mean atan(atan(value1, value))
What's with the "(value1, value2)"??? How do I calculate that???
Any help is highly appreciated
Somewhere it says that "value=atan2(value1, value2)"
I don't get it...
It can't mean atan(atan(value1, value))
What's with the "(value1, value2)"??? How do I calculate that???
Any help is highly appreciated





RE: What does "atan2(value1, value2)" mean???
atan2 takes arguments x and y.
TTFN
RE: What does "atan2(value1, value2)" mean???
Excel: ATAN2(x_num,y_num) Returns the arctangent, or inverse tangent, of the specified x- and y-coordinates. The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a point with coordinates (x_num, y_num). The angle is given in radians between -pi and pi, excluding -pi.
Syntax: ATAN2(x_num,y_num)
X_num is the x-coordinate of the point.
Y_num is the y-coordinate of the point.
Remarks:
o A positive result represents a counterclockwise angle from the x-axis; a negative result represents a clockwise angle.
o ATAN2(a,b) equals ATAN(b/a), except that a can equal 0 in ATAN2.
o If both x_num and y_num are 0, ATAN2 returns the #DIV/0! error value. To express the arctangent in degrees, multiply the result by 180/PI( ) or use the DEGREES function.
RE: What does "atan2(value1, value2)" mean???
Typically a=atan(x) returns a in just two quadrants (typically -pi/2 to pi/2). atan2(x,y) typically examines the sign of each argument and returns a in any of 4 quadrants.
Try atan2(-1,1) atan2(1,-1) atan2(1,1) and atan2 (-1,-1) to see what is going on.
Cheers
Greg Locock
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: What does "atan2(value1, value2)" mean???
Now I only need to know what csc() means ...
Regarding atan2, I found this function that will work in visual basic:
Public Function Atan2(ByVal y As Double, ByVal x As Double) _
As Double
Dim theta As Double
If (Abs(x) < 0.0000001) Then
If (Abs(y) < 0.0000001) Then
theta = 0#
ElseIf (y > 0#) Then
theta = 1.5707963267949
Else
theta = -1.5707963267949
End If
Else
theta = Atn(y / x)
If (x < 0) Then
If (y >= 0#) Then
theta = 3.14159265358979 + theta
Else
theta = theta - 3.14159265358979
End If
End If
End If
Atan2 = theta
End Function
RE: What does "atan2(value1, value2)" mean???
csc = cosecant
csc(x) = 1/sin(x)
RE: What does "atan2(value1, value2)" mean???
It is recommended before you ask any question to invest searching yourself for answer. The value of this is that you may became self-sufficient and exercise a basic skill for searching.
One way to accomplish that is using the software help menu or hit the key [F1].Other way is using the software manual or searching the internet.
Good luck