171 return lower +
pcgBounded(rng, upper - lower + 1);
196 return (int32)(lower +
pcgBounded(rng, (uint32)(upper - lower + 1)));
254 return (int64)(lower +
pcgBounded64(rng, (uint64)(upper - lower + 1)));
Runtime assertion macros and failure handling.
void pcgAdvance(PcgState *rng, uint64 delta)
bool pcgFlip(PcgState *rng)
uint32 pcgBounded(PcgState *rng, uint32 bound)
float32 pcgFRange(PcgState *rng, float32 lower, float32 upper)
uint32 pcgRange(PcgState *rng, uint32 lower, uint32 upper)
uint64 pcgRandom64(PcgState *rng)
uint64 pcgBounded64(PcgState *rng, uint64 bound)
uint32 pcgRandom(PcgState *rng)
int32 pcgSBounded(PcgState *rng, int32 bound)
uint64 pcgRange64(PcgState *rng, uint64 lower, uint64 upper)
int32 pcgSRange(PcgState *rng, int32 lower, int32 upper)
int64 pcgSRange64(PcgState *rng, int64 lower, int64 upper)
float64 pcgFRange64(PcgState *rng, float64 lower, float64 upper)
void pcgAutoSeed(PcgState *rng)
void pcgSeed(PcgState *rng, uint64 initstate, uint64 initseq)
uint64 inc
Controls which RNG sequence (stream) is selected - must always be odd.
uint64 state
RNG state - all values are possible.