Old 21st June 2002, 16:05   #1
eleet-2k2
Forum King
 
eleet-2k2's Avatar
 
Join Date: Aug 2001
Location: Mobil Ave.
Posts: 5,381
Trig help...

Can someone please help me with this VB code?

Here's my dilemma. I need to now convert my radian angle to degrees before I can use it in the primary trig ratio sin(angle) = opp/hyp.

code:

Public Function SineSolveOpp(ByVal theta As Double, ByVal hyp As Double) As Double
Dim RadTheta As Double, opp As Double, DegTheta As Double

'converts your angle (theta) to radians (RadTheta)
RadTheta = theta * DegToRadAngleX

'converts the angle from radians to degrees
DegTheta = (CDbl(Sin(RadTheta)))

' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'here is my problem. how do i convert my radian angle to a degree angle?

End Function



Thanks a lot for taking your time to help me.

[edit]I tried lots of source code sites but to no avail. Even www.planetsourcecode.com didnt have exactly what I needed.[/edit]

"Welcome to the Island of people who know too much."..."Did you really think balloons would stop him?!"
See what I'm listening too.
eleet-2k2 is offline   Reply With Quote
Old 21st June 2002, 16:16   #2
Trigear
bear!
 
Trigear's Avatar
 
Join Date: Jun 2002
Posts: 3,426
divide radian value by pi and multiply by 180.
Trigear is offline   Reply With Quote
Old 21st June 2002, 19:53   #3
eleet-2k2
Forum King
 
eleet-2k2's Avatar
 
Join Date: Aug 2001
Location: Mobil Ave.
Posts: 5,381
Thanks for the help TriGEAR. Over the course of the afternoon in ******* I fixed my problem.

"Welcome to the Island of people who know too much."..."Did you really think balloons would stop him?!"
See what I'm listening too.
eleet-2k2 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Community Center > General Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump