mirror of
https://github.com/godotengine/godot.git
synced 2025-04-13 01:00:35 +08:00
Merge pull request #48098 from KoBeWi/you_never_know
Make randomize() use unix time instead of ticks
This commit is contained in:
commit
c04681b969
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user