So...I have to check some values if they are equal. But they never were and I knew that they should be, I debugged my application and reached the following conclusion
-2.5f - Mathf.Round(1.1f) * 0.6f - (-3.1f) doest not equal to 0 but instead it's value is -1.192093E-07
Is there a reasonable explanation for this and is there a workaround? I really need the equation in this format.
PS: all values are here hardcoded but they are variables and they have other values too. The problem is when the result should be 0
Here is a line of code: Debug.Log(string.Format("{0} ", -2.5f - Mathf.Round(1.1f) * 0.6f - (-3.1f)));
Using Unity 4.5.1f3 with Monodevelop 4.0.1 on OS X 10.9.5.