×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

What does "atan2(value1, value2)" mean???

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

RE: What does "atan2(value1, value2)" mean???

Standard atan function take argument of x/y
atan2 takes arguments x and y.

TTFN



RE: What does "atan2(value1, value2)" mean???

Mathcad atan2(x,y) Returns the angle (in radians) from the x-axis to a line containing the origin (0,0) and the point (x,y). The value returned is always between -p and p, including p.

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

I think the emphasis is slightly wrong in the above, judging by the results in other languages.

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

(OP)
Thanks everyone

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

(OP)
Found it at www.answers.com

csc = cosecant

csc(x) = 1/sin(x)

RE: What does "atan2(value1, value2)" mean???

SteffDK

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources