Quaternion.Euler doesn't work right?

This seems wrong:

	Quaternion DesiredRot = Quaternion.Euler(90f, 0f, 0f);
    Debug.Log(DesiredRot.eulerAngles.x); // DISPLAYS 90
	
	Quaternion DesiredRot = Quaternion.Euler(100f, 0f, 0f);
    Debug.Log(DesiredRot.eulerAngles.x); // DISPLAYS 80. Why?
	
	Quaternion DesiredRot = Quaternion.Euler(110f, 0f, 0f);
    Debug.Log(DesiredRot.eulerAngles.x); // DISPLAYS 70. Why?
	
	Quaternion DesiredRot = Quaternion.Euler(120f, 0f, 0f);
    Debug.Log(DesiredRot.eulerAngles.x); // DISPLAYS 60. WHY...?

And the documentation says the params should come in a different order, yet that’s how it works.

Found an article about Quaternions.

If anyone else has this problem, you can’t just assign a rotation to a Quaternion apparently. You take your initial Quaternion and then multiply it by the second one, which should contain the rotation which you want to apply to the first one.

So you should basically do it like that:

    Quaternion initialRot = objToRotate.transform.rotation;
    objToRotate.transform.rotation = initialRot * Quaternion.Euler(90f, 0, 0);

This example just rotates the object by 90 degrees.

@Glabrezu is correct. Additionally, you can “kinda” assign an Euler angle by doing:

objToRotate.transform.rotation = Quaternion.Identity * Quaternion.Euler(90f, 0, 0);