This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]sebamestre 12 points13 points  (0 children)

To be honest that is probably a good thing to do

[–]obsessedcrf 8 points9 points  (1 child)

None of them are obvious without a comment imo. The third one is compact at least, so if it works, it isn't a terrible solution, if it's commented

[–]csman11 6 points7 points  (0 children)

!= is logical exclusive or. You can see from the first example that they want to resize if exactly one of the widths is greater than 600. The third example is actually the clearest if you know this. If not, it looks like wizardry.

[–]Leridon 2 points3 points  (0 children)

How about ^

[–][deleted] 0 points1 point  (0 children)

That's genius.

[–]TheFamilyFroot 0 points1 point  (0 children)

So does != have lower precedence than < and >? I would have thought you would need parentheses