Reputation: 15
I'm working on a Pythagorean Theorem program that calculates the sides and angles of a right triangle. I have the side measurements and all that down, but I can't find the Visual Basic function that will allow me to calculate the angles from the side measurements. I've tried asin and sinh, but both give me the wrong measure.
Upvotes: 1
Views: 2633
Reputation: 16703
Use the functions Math.Asin()
, Math.Acos()
, and Math.Atan()
. These are the inverse trigonometric functions that you can use to find the angles you're after. Sinh is a hyperbolic function and won't be any use for this.
Example:
theta = Math.Asin(b/c)
where b and c are two sides of your triangle.
Upvotes: 1
Reputation: 3250
They are methods on the Math class. http://msdn.microsoft.com/en-us/library/4zfefwz9.aspx
It would be Math.Asin(), Math.Sinh()
Upvotes: 0