def Word64.zigzag

bend-kit-protobuf@0.2.0.0 · protobuf.bend:40

import bend-kit-protobuf@0.2.0.0/protobuf.bend as Protobuf
import Base

40def Word64.zigzag(w: Word64) -> Word64:
41  Word64{+h, +l} = w
42  +mask = (0 - (h >> 31n) : U32)
43  Word64{(((h << 1n) .|. (l >> 31n)) .^. mask : U32), ((l << 1n) .^. mask : U32)}

Uses (7)

Used by (2)