#include <noise.h>
|
| PcgRandom (u64 state=0x853c49e6748fea9bULL, u64 seq=0xda3e39cb94b95bdbULL) |
|
void | seed (u64 state, u64 seq=0xda3e39cb94b95bdbULL) |
|
u32 | next () |
|
u32 | range (u32 bound) |
|
s32 | range (s32 min, s32 max) |
|
void | bytes (void *out, size_t len) |
|
s32 | randNormalDist (s32 min, s32 max, int num_trials=6) |
|
void | getState (u64 state[2]) const |
|
void | setState (const u64 state[2]) |
|
◆ PcgRandom()
PcgRandom::PcgRandom |
( |
u64 | state = 0x853c49e6748fea9bULL, |
|
|
u64 | seq = 0xda3e39cb94b95bdbULL ) |
◆ bytes()
void PcgRandom::bytes |
( |
void * | out, |
|
|
size_t | len ) |
◆ getState()
void PcgRandom::getState |
( |
u64 | state[2] | ) |
const |
◆ next()
References m_inc, and m_state.
Referenced by bytes(), OreVein::generate(), httpfetch_caller_alloc_secure(), myrand(), myrand_float(), range(), seed(), TestRandom::testPcgRandom(), TestRandom::testPcgRandomRange(), and TestMapBlock::testSaveLoad().
◆ randNormalDist()
s32 PcgRandom::randNormalDist |
( |
s32 | min, |
|
|
s32 | max, |
|
|
int | num_trials = 6 ) |
◆ range() [1/2]
s32 PcgRandom::range |
( |
s32 | min, |
|
|
s32 | max ) |
◆ range() [2/2]
u32 PcgRandom::range |
( |
u32 | bound | ) |
|
References next().
Referenced by BiomeGenOriginal::calcBiomeFromNoise(), DecoSchematic::generate(), DecoSimple::generate(), OreBlob::generate(), OrePuff::generate(), OreScatter::generate(), OreSheet::generate(), OreStratum::generate(), LuaPcgRandom::l_next(), myrand_range(), Decoration::placeDeco(), randNormalDist(), range(), TestRandom::testPcgRandomRange(), and Sky::updateStars().
◆ seed()
void PcgRandom::seed |
( |
u64 | state, |
|
|
u64 | seq = 0xda3e39cb94b95bdbULL ) |
◆ setState()
void PcgRandom::setState |
( |
const u64 | state[2] | ) |
|
◆ m_inc
◆ m_state
◆ RANDOM_MAX
const s32 PcgRandom::RANDOM_MAX = 0x7fffffff |
|
static |
◆ RANDOM_MIN
const s32 PcgRandom::RANDOM_MIN = -0x7fffffff - 1 |
|
static |
◆ RANDOM_RANGE
const u32 PcgRandom::RANDOM_RANGE = 0xffffffff |
|
static |
The documentation for this class was generated from the following files: