An open API service indexing awesome lists of open source software.

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

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)