Skip to content

Commit

Permalink
Make randomize() use unix time too
Browse files Browse the repository at this point in the history
  • Loading branch information
KoBeWi committed Apr 22, 2021
1 parent c7b97f0 commit 22efa85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/math/random_pcg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RandomPCG::RandomPCG(uint64_t p_seed, uint64_t p_inc) :
}

void RandomPCG::randomize() {
seed(OS::get_singleton()->get_ticks_usec() * pcg.state + PCG_DEFAULT_INC_64);
seed((OS::get_singleton()->get_unix_time() + OS::get_singleton()->get_ticks_usec()) * pcg.state + PCG_DEFAULT_INC_64);
}

double RandomPCG::random(double p_from, double p_to) {
Expand Down

0 comments on commit 22efa85

Please sign in to comment.