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

lume.weightedchoice - if rnd <= v instead of if rnd < v #41

Open
WilliamArnone opened this issue Feb 26, 2022 · 0 comments
Open

lume.weightedchoice - if rnd <= v instead of if rnd < v #41

WilliamArnone opened this issue Feb 26, 2022 · 0 comments

Comments

@WilliamArnone
Copy link

if you have a table {"first"=2, "second"=1} and the random pulls out a 3, rnd values are:
3
then
3-2 = 1
and then 1<1 is false, weightedchoice returns nil.

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

No branches or pull requests

1 participant