Re:Bit Twiddling Hacks (2005)
by emanuelev on Monday July 04, 2016 @03:02AM
(#12029249)
If you are referring to Morton's interleaving, then it's quite simple. You can compute the third operand's code and OR it with the others using the appropriate shift. Something like: (z << 2) | (y << 1) | x
[ Parent
| on HN ]
There are no comments on this comment yet.