|
Yasiu Math 1
Collection of mathematic functions that help create game mechanics and procedural tools
|
State based RNG, good for MonteCarlo sampling. More...
#include <PCG_RNG.h>
Public Member Functions | |
| void | InitBP (int64 StateIn, int64 StreamIn) |
| Initial set with 2 variables. | |
| int64 | GetState () const |
| Get current state in PCG. | |
| void | SetState (int64 stateIn) |
| Set only state in PCG. | |
| void | SetNoiseStream (int64 streamIn) |
| Set stream variable, used for generating next states. (must bee odd or will be changed to odd). | |
| double | GetNextDouble () |
| Generate next random number. | |
| double | GetCurrentDouble () const |
| Return last random double in range <0, 1>. | |
| int | GetNextInt (int A, int B) |
| Get random value in range <A, B>. | |
| int | GetCurrentInt (int A, int B) const |
| Get random value in range <A, B>. | |
Protected Attributes | |
| uint64 | stream = 0xda3e39cb94b95bdbULL |
| Noise for generation numbers. | |
State based RNG, good for MonteCarlo sampling.
| void UPCG_RNG32::InitBP | ( | int64 | StateIn, |
| int64 | StreamIn ) |
Initial set with 2 variables.
| StateIn | - model state |
| StreamIn | - Noise pattern to generate states |