452030de5e
encoding I experimented with a few branch-free variants, but they were slower than just using ternary operators and readable code.