Animation loop test

I'm currently putting together a variation of Zack Hixson's tile flip. Instead of a grid of objects created within animation nodes, I've used an predetermined Group based on an array. (I tried the grid approach first but got stuck with the same problem).

What i'm trying to do is make tiles remain flipped over once the empty has passed, rather than flipping back to their original position. I've tried all sorts of ways to effect this, the latest using nested loops:

What i've tried to do is test the rotation of each object in the group and, if it's x rotation is 180 degrees, it should be skipped and the next object in the loop should be tested. Interestingly, as seen in the viewer, the rotation comes up at 180.00001 degrees despite only being set at 180 as the empty passes. Inevitably the test fails.

Any thoughts on where i'm going wrong? As i say, i've put the test inside the core transformation loop in various forms but the it's comprehensively ignored in every location!!

I think that the main problem is that you are comparing the Angles using an Equal To compare node, generally you shouldn't use Equal to when comparing floats. Instead, for instance, if you want to check that a float x is equal to a float y, you check if |x-y|< epsilon where epsilon is some small float like 0.001.