4 ms·
zig-zag encoding is brilliant. Basically you can determine positive or negative based on odd/even and divide by 2 to get the value. I tried to come up with a si
by vitiral 2y ago
zig-zag encoding is brilliant. Basically you can determine positive or negative based on odd/even and divide by 2 to get the value. I tried to come up with a similar encoding and never thought of this
- repelsteeltje 2y agoYeah basically it's ones complement (or twos complement) but with the sign bit on the right, rather than the left.
- edflsafoiewq 2y agoIt's the same as enumerating 2D points in a spiral, but restricted to 1D.