diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2024-03-02 15:34:51 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2024-03-02 20:56:01 -0600 |
commit | 981883d041f6e316cb88c4411e9b140192a9da5e (patch) | |
tree | fcea9cb247535599ba07105d4272dab767e4a6c7 /core/math/random_pcg.cpp | |
parent | f2045ba822bff7d34964901393581a3117c394a9 (diff) | |
download | redot-engine-981883d041f6e316cb88c4411e9b140192a9da5e.tar.gz |
Fix `RandomNumberGenerator::rand_weighted` return type
Diffstat (limited to 'core/math/random_pcg.cpp')
-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 e754a34271..e083820494 100644 --- a/core/math/random_pcg.cpp +++ b/core/math/random_pcg.cpp @@ -43,7 +43,7 @@ void RandomPCG::randomize() { seed(((uint64_t)OS::get_singleton()->get_unix_time() + OS::get_singleton()->get_ticks_usec()) * pcg.state + PCG_DEFAULT_INC_64); } -int RandomPCG::rand_weighted(const Vector<float> &p_weights) { +int64_t RandomPCG::rand_weighted(const Vector<float> &p_weights) { ERR_FAIL_COND_V_MSG(p_weights.is_empty(), -1, "Weights array is empty."); int64_t weights_size = p_weights.size(); const float *weights = p_weights.ptr(); |