3 Replies Latest reply on Jul 5, 2006 10:31 PM by eaglecat

    Zero not Zero!

      I have two values, angles in radians, that I compare in an if statement. "if(a==b){do this}". I trace 'a' and 'b' and I can see that they are the same. I have even rounded the values to 4 decimal places. They trace as the same but the 'do this' does not run every time. So i did a trace of (a - b) and the result was not zero (it should of been) and of course the 'do this' did not run. (a-b) traced 2.354647749883643e-23 or something like that. when it traced zero it did work. My question is: if a = 0.1735 and b=0.1735 then why does Flash throw up (a-b) = 2.354647749883643e-23?