Results 1 to 4 of 4

Math Help - Understanding atan2 formula

  1. #1
    Newbie
    Joined
    Sep 2011
    Posts
    1

    Understanding atan2 formula

    So I'm learning computer programming and I've come across a formula:

    atan2(y,x)

    According to wikipedia this is calculated by:

    2 arctan (square root(x^2 + y^2) - x) / y

    Could someone please explain what this formula means.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2

    Re: Understanding atan2 formula

    Check the wiki. Basically, the range of the atan2 function is (-\pi,\pi], whereas the atan function has a smaller range (approximately half that).
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,605
    Thanks
    1573
    Awards
    1

    Re: Understanding atan2 formula

    Quote Originally Posted by Trik View Post
    So I'm learning computer programming and I've come across a formula:

    atan2(y,x)

    According to wikipedia this is calculated by:

    2 arctan (square root(x^2 + y^2) - x) / y

    Could someone please explain what this formula means.
    You must give a wikipedia reference on that.
    Something is just not right about that.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: Understanding atan2 formula

    Quote Originally Posted by Trik View Post
    So I'm learning computer programming and I've come across a formula:

    atan2(y,x)

    According to wikipedia this is calculated by:

    2 arctan (square root(x^2 + y^2) - x) / y

    Could someone please explain what this formula means.
    Go back and put the brackets in the correct places (I know that the article has a missing set of brackets but that is less important in properly typeset mathematics, in linear mathematical notation you have to put in the brackets as otherwise what you type does not mean what you think it does).

    The article explains what atan2 is/does.For that particular formula read what wikipedia says and follow the link where it points to the tangent half angle formula.

    When you have done that if you have any more questions about this post a follow up question in this thread.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Lost understanding this formula
    Posted in the Trigonometry Forum
    Replies: 4
    Last Post: November 23rd 2011, 08:33 AM
  2. Replies: 4
    Last Post: July 15th 2011, 01:30 PM
  3. Replies: 8
    Last Post: September 5th 2010, 12:11 PM
  4. Matlab atan2
    Posted in the Math Software Forum
    Replies: 1
    Last Post: February 9th 2009, 05:13 AM
  5. Understanding a formula
    Posted in the Calculus Forum
    Replies: 1
    Last Post: December 27th 2008, 01:41 PM

Search Tags


/mathhelpforum @mathhelpforum