Okay, so I am creating a countdown using animation nodes, where the text rotates along the Y-axis. The goal is each time the text is rotated 90 degrees I want the object to flip along the X-axis (scale x * -1). I have set it up to where the numbers countdown every 25 frames and are also rotated to a 90 degree angle every 50 seconds starting at frame 25.
Once I recreated your node tree I realized what you want is for the text to always read forward. To accomplish that I used the sign of the cosine of your rotation angle output, which is negative when the text is rotated away from the viewer, and used a 'copy sign' math node to build the scale vector.