Unity.Mathematics.quaternion.Euler vs UnityEngine.Quaternion.Euler

Sorry if this question is too dumb, but I can’t quite understand why the conversion from Euler to Quaternion is returning vastly different results when using Unity.Mathematics:

// returns Quaternion(0.4, 0.3, -0.2, 0.8)
UnityEngine.Quaternion.Euler(50f, 45f, 0f);

// returns quaternion(0.1155834, -0.4828888, -0.0644784, -0.865622)
Unity.Mathematics.quaternion.EulerZXY(50f, 45f, 0f);

The things I can think of is: radians vs degrees (but I believe both uses degrees) and rotation order (which I believe Quaternion.Euler is similar to quaternion.EulerZXY). Thanks in advance.

Quaternion.Euler is in degrees.

Read the description of quaternion.Euler, it’s in radians.

If you think they’re in radians why are you passing degrees?

-edit-

yeah it’s a bit confusing they changed the behavior, but the new math library is very well documented.

1 Like

Oops thanks, yeah, I wanted to say degrees.Thanks.