Click here to Skip to main content
15,922,630 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to write code for a right triangle. I have a data table for the Sine, Cosine, Tangent, and Radians for the degrees from 0 to 90. The table I wrote is in a dataset waiting to be accessed. I want to have the code search the table with the input of a degree and search the table and return the Sine function to a textbox so the rest of my program can manipulate the Sine function and return an answer so the viewer can see what the right triangle consists of, i.e., Adjacent, Opposite, hypotenuse, Angle A and Angle B using the Law of Sines and Law of Cosines. I thank you for the help to anyone who does help. I appreciate you so very much

What I have tried:

I have looked in some of the books I have that deals with VB 2005, VB 2010, VB.NET, and search the web, but cannot find anything that will help, nor can I find the code that will help.
Posted
Updated 29-Dec-18 6:58am
Comments
MadMyche 29-Dec-18 10:47am    
So are we doing this in SQL or are we doing this in VB? Why are you storing all the trig values in a table when both SQL & VB have these functions built in?

Quote:
I am trying to write code for a right triangle. I have a data table for the Sine, Cosine, Tangent, and Radians for the degrees from 0 to 90.

The whole idea is counter productive, it is common knowledge that trig functions are slow, but compared to a SQL request, they are blazingly fast.
You are using a canon to kill a mosquito.

Using vb integrated functions is much faster.
 
Share this answer
 
Something like this:
Dim result = myDataSet.myTable.Select("Degrees = " & degree)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900