Yes, you're right. Mathematical jargon has never been my cup of tea (which is why I provided an example, just to be sure). For some reason, I tend to think of negating in boolean context only, go figure.
Creating a function just for that in real code would be silly indeed, but that line was part of a larger function and I just singled it out to make things shorter. I'm aware of unary -, but is it better emulated by style #1 or style #2 if I just happen to use one or the other?
Afterthought: Curiously enough, when we talk about a display, inverting it means making black white and making white black, doesn't it? Yet, what we are really doing is negating each pixel's value.