Description
This is a very small, simple-to-use API for selecting random items from a list with probabilities.
How to use
First, create a Random object using Random:new(), then add all your items using Random:add_choice(choice, probability), and finally, call Random:calc_csum().
When you want to get an item from the list, simply call Random:choose().
Releases
2019-08-21 03:49 UTC
2019-08-20
No release notes
2019-08-16 04:42 UTC
2019-08-15
No release notes
All releases
Threads
New thread
Information
Provides
random_api
Dependencies
- Required
-
No required dependencies
Information
- Type
- Mod
- Technical Name
- random_api
- Languages
-
English
- License
-
AGPL-2.0-only
- Maintenance State
- Unknown
- Added
- 2019-08-16 04:41 UTC
- Maintainers
-
TheFanne