fraction_life
FractionLife is a weighted randomizer that returns a single integer.
The randomizer is called with the generate
method:
FractionLife.generate()
Half the time that call returns 1. Of the other half of the time, half the time it returns 2. Of the other half of that time, half the time it returns 3, etc. So the probablity of any given integer n being returned is .5 ^ n.
Install
gem install fraction_life
Author
Mike O'Sullivan [email protected]
History
version | date | notes |
---|---|---|
0.0.6 | Nov 9, 2018 | Working out how to structure gem. No significant changes to functionality. |
0.0.5 | Nov 8, 2018 | Cleaning up documentation. |
0.0.4 | Nov 8, 2018 | Completely rewrote code to run more efficiently. |
0.0.3 | - | Accidentally skipped a number, so there never actually was a version 0.0.3. |
0.0.2 | Nov 4, 2018 | Minor fixes to documentation. |
0.0.1 | Nov 4, 2018 | Initial upload. |