diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-05-03 16:26:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-03 16:26:15 +0200 |
commit | bd215f0195d70178908ceac157dfb58d18d7dc31 (patch) | |
tree | 08a7fa7df636475382026a3dcb06bd5eea808ae6 | |
parent | bc228e453f3aae546c99cf07f843ca31b8485ffc (diff) | |
parent | 7610fc02a0ad0e6106a61da2f97b1ad85bca7ea8 (diff) |
Merge pull request #48407 from vnen/randomize-use-same-type
Cast Unix time to uint in the randomize function
-rw-r--r-- | core/math/random_pcg.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/random_pcg.cpp b/core/math/random_pcg.cpp index 1152c4e834..681c2a9717 100644 --- a/core/math/random_pcg.cpp +++ b/core/math/random_pcg.cpp @@ -39,7 +39,7 @@ RandomPCG::RandomPCG(uint64_t p_seed, uint64_t p_inc) : } void RandomPCG::randomize() { - seed((OS::get_singleton()->get_unix_time() + OS::get_singleton()->get_ticks_usec()) * pcg.state + PCG_DEFAULT_INC_64); + seed(((uint64_t)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) { |