Help needed to create a formula pls!!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I create a formula to calculate angles, using half the chord dimension and dividing that by the radius then using second function SIN then multiply the answer by 2.
 
I believe either of these two equations should give you the angle in
Radians. However, I have used c to represent the full length of the cord,
not half of the cord. Adjust if you wish to enter c/2.

Function FindAngle(r, c) As Double
FindAngle = 2 * WorksheetFunction.Asin(c / (2 * r))
End Function

Function FindAngle(r, c) As Double
On Error Resume Next
FindAngle = 2 * Atn(c / (r * Sqr(4 - (c * c) / (r * r))))
' Check 11: "Division by zero" at 90 Degrees
If Err.Number = 11 Then FindAngle = 4 * Atn(1)
End Function

Here were two quick tests at 180 Deg, and 90 Deg.

Sub TestIt()
' 180 Deg, or 2 Pi
Debug.Print FindAngle(4, 8)
' 90 Deg, or Pi
Debug.Print FindAngle(4, 4 * Sqr(2))
End Sub


HTH.
--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


Mark said:
How do I create a formula to calculate angles, using half the chord
dimension and dividing that by the radius then using second function SIN
then multiply the answer by 2.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top