943,526 Members | Top Members by Rank

Ad:
Oct 3rd, 2005
0

Arc Cosine

Expand Post »
I've looked in a couple of books, and can't find this anywhere, i'm looking for the opposite of the cos funtion, i.e. I know the cos of the angle, and need to know the actual size of the angle, is there an implicit function? If not, how can I achieve the same result? Any help would be much appreciated...
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
grandfilth is offline Offline
16 posts
since Sep 2005
Oct 4th, 2005
0

Re: Arc Cosine

try this function :

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Public Function ArcCos(ByVal X As Double) As Double
  2. If X <> 1 Then
  3. ArcCos = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
  4. Else
  5. ArcCos = 0
  6. End If
  7. End Function
Reputation Points: 350
Solved Threads: 63
Posting Pro
invisal is offline Offline
562 posts
since Mar 2005
Oct 5th, 2005
0

Re: Arc Cosine

Thanks, i'll check if it works, how does it work?What's Atn?What's the theory behind it?Any help would be much appreciated, i'd like to understand you see...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
grandfilth is offline Offline
16 posts
since Sep 2005
Oct 5th, 2005
0

Re: Arc Cosine

Atn is arctangent

let talk about math

tan(x) = sin(x) / cos(x)
cos(x) = sqr(1 - sin(x)^2)
tan(x) = sin(x) / sqr(1 - sin(x)^2)

so we got ArcSin = X / sqr(-X * X + 1)
and ArcCos = 90 - ArcSin
so ArcCos = (-X / sqr(-X * X + 1)) + 2 * Atn(1)
Reputation Points: 350
Solved Threads: 63
Posting Pro
invisal is offline Offline
562 posts
since Mar 2005
Oct 5th, 2005
0

Re: Arc Cosine

Thankyou very much for quenching my thirst for knowledge!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
grandfilth is offline Offline
16 posts
since Sep 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: need a count down timer
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Reading out systems OS used memory





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC