Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Random.choice does not include last value in array #7

Closed
serjek opened this issue Dec 23, 2017 · 0 comments
Closed

Random.choice does not include last value in array #7

serjek opened this issue Dec 23, 2017 · 0 comments

Comments

@serjek
Copy link
Contributor

serjek commented Dec 23, 2017

choice = integer(0, items[0].length - 1); but since integer returns [min,max), items[0].length - 1 will never be rolled, resulting in last value of array to be excluded from output.

serjek added a commit to serjek/nexuslib-as3 that referenced this issue Dec 23, 2017
…ays#7 (Random.choice does not include last value in array)
nexussays added a commit that referenced this issue Dec 30, 2017
resolves #6 and #7
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants