Rad to degree


Why is this line wrong???

float deg = Mathf.Tan(30) * Mathf.Rad2Deg;

The return = -2.18504, that is not what I want.

I know that rad have to get to grad, but however…

What I want to do is, making this simple calculation:

tan30 = 0.57735…


Please help. Thanks!

I found it out!

It has to be following:

float deg = (Mathf.Tan(30 * Mathf.Deg2Rad) );

I firstly had to calculate my numbers back to Input type radans and the I can return to grads.

Question stays to help others :wink: Cheers