![]() |
nCine 2022.04.r504-20bd01e
A cross-platform 2D game engine
|
PCG32 random number generator. More...
#include <Random.h>
Public Member Functions | |
Random () | |
Creates a new generator with default seeds. | |
Random (uint64_t initState, uint64_t initSequence) | |
Creates a new generator with the specified seeds. | |
void | init (uint64_t initState, uint64_t initSequence) |
Initializes the generator with the specified seeds. | |
uint32_t | integer () |
Generates a uniformly distributed `32-bit number. | |
uint32_t | integer (uint32_t min, uint32_t max) |
Generates a uniformly distributed `32-bit number, r, where min <= r < max. | |
float | real () |
Generates a uniformly distributed float number, r, where 0 <= r < 1. | |
float | real (float min, float max) |
Generates a uniformly distributed float number, r, where min <= r < max. | |
uint32_t | fastInteger (uint32_t min, uint32_t max) |
Faster but less uniform version of integer() | |
float | fastReal () |
Faster but less uniform version of real() | |
float | fastReal (float min, float max) |
Faster but less uniform version of real() | |
PCG32 random number generator.
Based on the Apache License 2.0 code from pcg-random.org