how to input trig equations into c# code

  • Thread starter Thread starter LavaCreeperKing
  • Start date Start date
L

LavaCreeperKing

Guest
I want to be able to get the angle of a right triangle from two lines, then I need to get the length of the hypotenuse, but I don't know how to put that into code. I know that first I need to do this:

adjacent = 300, opposite = 400

300 / 400 = 0.75

But what do I do next? I know that the angle is going to be 36.9, but how to I put the equation into code? I tried Math.Atan(0.75) thinking that is what I needed to do, but the number I get back is nothing close to 36.9. What do I do?

Continue reading...
 
Back
Top