https://github.com/posva/rndm
Random number generation for vim
https://github.com/posva/rndm
Last synced: 4 months ago
JSON representation
Random number generation for vim
- Host: GitHub
- URL: https://github.com/posva/rndm
- Owner: posva
- Created: 2014-04-07T12:08:43.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-04-07T12:43:43.000Z (about 12 years ago)
- Last Synced: 2025-07-19T21:58:51.926Z (11 months ago)
- Language: VimL
- Size: 145 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Rndm.vim
====
*Author: Charles E. Campbell, Jr.*
Date: Aug 12, 2008
Version: 4f ASTRO-ONLY
Discussion: algorithm developed at MIT
`Rndm.vim` uses three pseudo-random seed variables
`g:rndm_m1 g:rndm_m2 g:rndm_m3`
Each should be on the interval 0 - 100,000,000
* `RndmInit(s1,s2,s3)`: takes three arguments to set the three seeds (optional)
* `Rndm()` : generates a pseudo-random variate on [0,100000000)
* `Urndm(a,b)` : generates a uniformly distributed pseudo-random variate on the interval [a,b]
* `Dice(qty,sides)` : emulates a variate from sum of "qty" user-specified dice, each of which can take on values [1,sides]
* `SetDeck(N)` : returns a pseudo-random "deck" of integers from 1..N (actually, a list of pseudo-randomly distributed integers)