I am trying to do the following calculation but nothing I do works for me
The calculation of tan-1(1)
the result of the calculator is 45 grados
but I can't get that result in C#.
Code:
Math.Tanh(1);// resultado = 0,761594155955765
Math.Atan(1);//resultado = 0,785398163397448
Math.Tan(1);//1,5574077246549
I suppose that I must carry out some more operation with one of them, but what operation and which one to use to obtain the result.
You have to use Math.Atan(Double) .
According to Microsoft documentation
Taking this into account, it can be seen that the problem occurs because you are looking to obtain the degrees and the function is returning radians.
To get the result in degrees you should do the following