You could normalize the angle to a range of (-180,180) with angle(0,0,cos(a),sin(a)) before comparison.
Or you could use the sprite condition "is within angle" or "is between angles".
Or you could use the anglediff(a,b) expression to find the angle difference in the range of (0,180).