PDA

Click to See Complete Forum and Search --> : ATAN2 Function replacement


RknRon
Jul 14th, 2001, 07:21 PM
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

DavidHooper
Jul 15th, 2001, 11:49 AM
ATAN2(x,y) is the same thing as ATAN(y/x).

kedaman
Jul 15th, 2001, 07:06 PM
If X Then
Atan2 = Atn(Y / X) - (X > 0) * 3.14159265358979
Else
Atan2 = 1.5707963267949 + (Y > 0) * 3.14159265358979
End If