This is a great place to use some #defines to keep the code readable. I'm not a big fan of ```((((invert>>0)&1)?(-1):(1))```.