parent
91fb807088
commit
bce56cf337
|
@ -33,7 +33,8 @@
|
||||||
#include "core/os/os.h"
|
#include "core/os/os.h"
|
||||||
|
|
||||||
RandomPCG::RandomPCG(uint64_t p_seed, uint64_t p_inc) :
|
RandomPCG::RandomPCG(uint64_t p_seed, uint64_t p_inc) :
|
||||||
pcg() {
|
pcg(),
|
||||||
|
current_seed(DEFAULT_SEED) {
|
||||||
pcg.inc = p_inc;
|
pcg.inc = p_inc;
|
||||||
seed(p_seed);
|
seed(p_seed);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
class RandomPCG {
|
class RandomPCG {
|
||||||
pcg32_random_t pcg;
|
pcg32_random_t pcg;
|
||||||
uint64_t current_seed = DEFAULT_SEED; // seed with this to get the same state
|
uint64_t current_seed; // seed with this to get the same state
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const uint64_t DEFAULT_SEED = 12047754176567800795U;
|
static const uint64_t DEFAULT_SEED = 12047754176567800795U;
|
||||||
|
|
Loading…
Reference in New Issue