// *Really* minimal PCG32 code / (c) 2014 M.E. O'Neill / pcg-random.org // Licensed under Apache License 2.0 (NO WARRANTY, etc. see website) #include "pcg.h" uint32_t pcg32_random_r(pcg32_random_t* rng) { … } // Source from http://www.pcg-random.org/downloads/pcg-c-basic-0.9.zip void pcg32_srandom_r(pcg32_random_t* rng, uint64_t initstate, uint64_t initseq) { … } // Source from https://github.com/imneme/pcg-c-basic/blob/master/pcg_basic.c // pcg32_boundedrand_r(rng, bound): // Generate a uniformly distributed number, r, where 0 <= r < bound uint32_t pcg32_boundedrand_r(pcg32_random_t *rng, uint32_t bound) { … }