Skip to content

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

@WilliamArnone

Description

@WilliamArnone

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions