fraction_life 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2150587521f187cdd0197f8669a52d18ac14893
|
4
|
+
data.tar.gz: f632065fd1df8e8decf074cb2143200188499c4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b0d273573d13cf409ae2cdcfb1bfd5e532b9fb032b1e4264db41049623ae446257a521d8f6824776dbec2f6769b6d7fb29acc1da8ecc3b3e3243f99d0c16a99
|
7
|
+
data.tar.gz: be9634b0c1fc1ead2c16debad581542c56920871db145f1f2c6ac7d9a7e757bda98f2fea7c5baf3bb2fd4d4b8e417a0ad2393957c3dbd0c005d0d0e5aca0aa04
|
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# fraction_life
|
2
|
+
|
3
|
+
FractionLife is a weighted randomizer that returns a single integer.
|
4
|
+
The randomizer is called with the `generate` method:
|
5
|
+
|
6
|
+
FractionLife.generate()
|
7
|
+
|
8
|
+
Half the time that call returns 1. Of the other half of the time, half the
|
9
|
+
time it returns 2. Of the other half of *that* time, half the time it returns
|
10
|
+
3, etc. So the probablity of any given integer n being returned is .5 ^ n.
|
11
|
+
|
12
|
+
## Install
|
13
|
+
|
14
|
+
```
|
15
|
+
gem install fraction_life
|
16
|
+
```
|
17
|
+
|
18
|
+
## Author
|
19
|
+
|
20
|
+
Mike O'Sullivan
|
21
|
+
mike@idocs.com
|
22
|
+
|
23
|
+
## History
|
24
|
+
|
25
|
+
| version | date | notes |
|
26
|
+
|----------|-------------|------|
|
27
|
+
| 0.0.6 | Nov 9, 2018 | Working out how to structure gem. No significant changes to functionality. |
|
28
|
+
| 0.0.5 | Nov 8, 2018 | Cleaning up documentation. |
|
29
|
+
| 0.0.4 | Nov 8, 2018 | Completely rewrote code to run more efficiently. |
|
30
|
+
| 0.0.3 | - | Accidentally skipped a number, so there never actually was a version 0.0.3. |
|
31
|
+
| 0.0.2 | Nov 4, 2018 | Minor fixes to documentation. |
|
32
|
+
| 0.0.1 | Nov 4, 2018 | Initial upload. |
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fraction_life
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike O'Sullivan
|
@@ -17,6 +17,7 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- README.md
|
20
21
|
- lib/fraction_life.rb
|
21
22
|
homepage: https://rubygems.org/gems/fraction_life
|
22
23
|
licenses:
|