|
-
Apr 5th, 2010, 05:46 AM
#8
Thread Starter
New Member
Re: How To calculate the startangle and endangle in arc?
i am using atan2 function but i am doubt it is not giving correct..
the code which i used ..
If y > 0 Then
If x >= y Then
Atan21 = Atn(y / x)
ElseIf x <= -y Then
Atan21 = Atn(y / x) + Pi
Else
Atan21 = Pi / 2 - Atn(x / y)
End If
Else
If x >= -y Then
Atan21 = Atn(y / x)
ElseIf x <= y Then
Atan21 = Atn(y / x) - Pi
Else
Atan21 = -Atn(x / y) - Pi / 2
End If
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|