Yasiu Math 1
Collection of mathematic functions that help create game mechanics and procedural tools
Loading...
Searching...
No Matches
UPCG_RNG32 Class Reference

State based RNG, good for MonteCarlo sampling. More...

#include <PCG_RNG.h>

Inheritance diagram for UPCG_RNG32:

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.

Detailed Description

State based RNG, good for MonteCarlo sampling.

  • NetReplicated: Yes
  • GameSave: Yes

Member Function Documentation

◆ InitBP()

void UPCG_RNG32::InitBP ( int64 StateIn,
int64 StreamIn )

Initial set with 2 variables.

Parameters
StateIn- model state
StreamIn- Noise pattern to generate states

The documentation for this class was generated from the following file: