Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

They're doing a bunch of bit voodoo. The ^ operator is XOR, '<<' shifts bits left and '&' is a bitwise AND. That's what they are in C++ at least.

x = a&x ? a&b : c+x is a lot like the C++ shorthand if-then-else thingamabob: x = ( 1 < 0 ) ? 10 : -10; which translates to: x = 10 if 1 < 0 else x = -10.

Not sure what they mean with their thingamabob though.



Their ternary operator is a ternary operator.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: