Answers for "Unity editor rotation accuracy 89.999 etc"
http://answers.unity.com/questions/1156322/unity-editor-rotation-accuracy-89999-etc.html
The latest answers for the question "Unity editor rotation accuracy 89.999 etc"Answer by Matexyu
http://answers.unity.com/answers/1333142/view.html
By the way, it looks like this rounding error no longer manifests itself when copy-pasting GameObjects, at least here, using Unity 5.5.1f1.Thu, 30 Mar 2017 13:22:29 GMTMatexyuAnswer by Theli
http://answers.unity.com/answers/1156332/view.html
There is no "fix", it's just how floating numbers work. They are not precise by their definition.
In depth: You can actually have exactly 90 as floating number, like many other integer values. However under the hood unity doesn't use Euler angles for rotations, it uses quaternions. So, when you set rotation to 90 degrees it gets converted to quaternion. Quaternion consists of four small floating numbers (all of them are < 1), and these are not precise. So when editor converts them back into Euler angles to display to you small errors are inevitable.Thu, 17 Mar 2016 15:22:12 GMTTheliAnswer by Kamil1064
http://answers.unity.com/answers/1156334/view.html
@MSpiteri, That's normal behaviour and not only in unity, the same in blender, for example. But if you need to compare values and you don't want random working you may use:
private float precise = 90;
if(Mathf.Round(transform.rotation.z) == precise)
// do you stuffThu, 17 Mar 2016 10:55:53 GMTKamil1064