cos(A)=0.15425
how to get A value?
Printable View
cos(A)=0.15425
how to get A value?
do you have msdn library installed? have you tried searching there first?
hi,
what is A?
and u can get value like
Cos(0.15425)
which returns double value.
i didn't install the msdn library...
what i want to know is, how to get the A (is an angle) value.
cos(A)=0.15425 (the 0.15425 is in radian, not degree).............
Code:Private Sub Command1_Click()
MsgBox "A = " & ArcCos(0.15425)
End Sub
Function ArcCos(X As Double) As Double
ArcCos = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
End Function
you might want to add in some error handling, since the inverse cosine is only defined for inputs between -1 and 1. Also, ArcCos(1) = 0, ArcCos(-1) = pi