degrees to radians formula question

Howdy,

I want to convert this asinv( sinv( 23.45 ) ) (in degrees, CW I think) to Unity c# code, but the Math/Mathf functions seem to use radians so I need to convert them. But I can’t seem to get it right.

I thought it would be something like this (for a float):
Mathf.Asin ( Mathf.Sin( Mathf.Deg2Rad * 23.45f ) )

Maybe I am missing some conversion?

Tnx for taking the time.

You don’t say what your source language is, but on the assumption that asinv expects an input between -1 and 1, and returns an angle between 0-360, whereas sin expects an input between 0-360 and returns a value between -1 and 1, then you need to convert the result of Unity’s methods back to degrees:

Mathf.Rad2Deg * Mathf.Asin ( Mathf.Sin( Mathf.Deg2Rad * 23.45f ) )