954,119 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Arc Cosine

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...

grandfilth
Newbie Poster
16 posts since Sep 2005
Reputation Points: 10
Solved Threads: 0
 

try this function :

Public Function ArcCos(ByVal X As Double) As Double
    If X <> 1 Then
        ArcCos = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
    Else
        ArcCos = 0
    End If
End Function
invisal
Posting Pro
562 posts since Mar 2005
Reputation Points: 350
Solved Threads: 64
 

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...

grandfilth
Newbie Poster
16 posts since Sep 2005
Reputation Points: 10
Solved Threads: 0
 

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)

invisal
Posting Pro
562 posts since Mar 2005
Reputation Points: 350
Solved Threads: 64
 

Thankyou very much for quenching my thirst for knowledge!

grandfilth
Newbie Poster
16 posts since Sep 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You