RandomMixin::randbits

Generate a random (bits)-bit integer.

Synopsis

Declared in <random.h>

uint64_t
randbits(int bits) noexcept;

Return Value

A random integer whose low bits bits are random and the rest zero.

Parameters

NameDescription
bitsThe number of random bits to produce (0 to 64).