Clamping to {0,1} using in C. Or, how to write unreadable code.
stackoverflow.com