|
-
Feb 26th, 2009, 06:37 AM
#1
Thread Starter
New Member
using trig functions in vb.net
Hi every 1
Im building a maths program, to work out trig functions using sine, tan and opp. I made up one question asking the user to find the length of the opp side. The Hyp side has got 9cm(HYP) and the angle is 40 degrees and u need to find the size of X(OPP). I have dont the quesiton on pen and paper using a calculator and it works out to be 5.79cm.
When i do it vb.net it comes out as 54.7. This is the code im using to work it out using vb.net maths operators:
Public Function RatioSineFindingLength(ByVal length As Double, ByVal angle As Double) As Double
Dim lengthReturn As Double
lengthReturn = (length / (Sin(angle)))
Return lengthReturn
End Function
ANY HELP WOULD BE GREAT.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|