Results 1 to 3 of 3

Thread: ATAN2 Function replacement

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Posts
    1

    Post ATAN2 Function replacement

    I am looking for the math that performs the same thing as the ATAN2 function used in Excell. The problem is, in VB the only function available is ATAN.

    Anyones help would be greatly appreciated.

    Ron

  2. #2
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357
    ATAN2(x,y) is the same thing as ATAN(y/x).
    There are 10 types of people in the world - those that understand binary, and those that don't.

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Code:
    If X Then
            Atan2 = Atn(Y / X) - (X > 0) * 3.14159265358979
        Else
            Atan2 = 1.5707963267949 + (Y > 0) * 3.14159265358979
    End If
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width