split_by_2
split_by_2(a) ⇒ number
method to separate bits from a given integer 2 positions apart
Kind: global function
See: https://github.com/Forceflow/libmorton/blob/234a443ca8e2c64f6385f1a9d6ee10a70d08a3fa/include/libmorton/morton2D.h#L99
Param | Type |
---|---|
a | number |
Example
when input is ABC, output bits are 0A0B0C