toZigZag

Encodes a number in its zigzag encoding

@nogc pure nothrow @safe @property
Unsigned!T
toZigZag
(
T
)
(
in T src
)
if (
isIntegral!T &&
isSigned!T
)

Parameters

src T

The raw integer to encode

Return Value

Type: Unsigned!T

The zigzag-encoded value

Meta