Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RandomNumberGenerator::rand_weighted return type #89104

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

luevano
Copy link
Contributor

@luevano luevano commented Mar 3, 2024

Fixes wrong return type introduced in #88883:

RandomNumberGenerator::rand_weighted returns int instead of int64_t (the returned value i is defined as int64_t inside the for loop).

Also made minor changes to the documentation example (few typos).

As a side note, can we change the internal RandomPCG::rand_weighted method name to random_weighted (all other methods here are just called random)? The exposed one from RandomNumberGenerator would remain the same rand_weighted.

@luevano luevano requested review from a team as code owners March 3, 2024 03:31
@Mickeon Mickeon added this to the 4.3 milestone Mar 3, 2024
@akien-mga akien-mga merged commit 48aa120 into godotengine:master Mar 4, 2024
16 checks passed
@akien-mga
Copy link
Member

akien-mga commented Mar 4, 2024

Thanks! And congrats for your first merged Godot contribution 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants