Weird rotation precision

Hi, I have script where I try to rotate my object to desired position, but the object doesnt have the exact angle I want, and its almost 1 degree of difference. I even wrote in script:

Quaternion _newRotation = connector.transform.parent.parent.localRotation;

_newRotation.y = 180;

connector.transform.parent.parent.localRotation = _newRotation;

But the rotation of object still isn’t exact 180
99605-transform.png

I have never faced something like that. I know about floating point precision but most of the time its difference of about 0.00001 , not almost 0.7
How is that happening and how can I prevent this?
Because of this I can’t properly merge rooms for procedural dungeon generation

A Quaternion is a 4 dimensional complex number and do not represent euler angles.

You do not need to fully understand how quaternions work, but if you don’t you shouldn’t mess with it’s 4 components. You can use Quaternions only by using the various static methods it provides.

You haven’t presented how you actually create your rotation and how you define your “desired position”.

You can create an absolute or relative rotation based on eulerangles by using Quaternion.Euler. Though in many cases you usually use things like Quaternion.LookRotation, Quaternion.AngleAxis or Quaternion.FromToRotation to create a rotation. For more details see the documentation

probably it is Child with something . than it have some weird rotation .