change the rotation of an object by rounding the angle

i want to know how to safely round a quanterion value.

basically i want to make a rotational change but only by whole number degrees

I figured i could do

					selection.RotateAround(Camera.main.transform.forward, rotate_speed *Time.deltaTime);

selection.rotation = new Vector3(Mathf.Round(selection.rotation.x), selection.rotation.y, selection.rotation.z);

to round the x rotation. however i can’t because its a quanternion and messing with the values of a quanterion manually isn’t supposed to be a good idea. So how can i convert
a quanternion to a euler so i can round that euler and then convert that euler to a quaternion

youhave the mathematics pretty good, also be aware of floor and ceil rounding options,

Try this-

myEuler = selection.transform.localEulerAngles;

myEuler = selection.transform.eulerAngles;
and then use that vector three instead.