A random number generator with an optional seed
JavaScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
prng Changed over to a custom alea prng Oct 16, 2015
.travis.yml Travis CI Nov 21, 2015
LICENSE 209234957234982340985092347 Oct 6, 2015
README.md Travis CI Nov 21, 2015
package.json 1.1.3 Nov 21, 2015
random.js rewrote undefined paramater handling Oct 18, 2015
test.js Changed over to a custom alea prng Oct 16, 2015

README.md

Random

build status stability

Creates a random number generated with an optional seed. Random values can be generated on a range, and as a boolean.

Usage

var Random = require('@tatumcreative/random')

var random = Random( "My seed" )

// 0.0 - 1.0
random()

// 5.0 - 10.0
random(5, 10)

// 5 - 10
random(5, 10, true)

Types of seeds

var seededByDate = Random()
var seededByNumber = Random( 1 )
var seededByString = Random( "hello" )
var seededByMultipleArgs = Random( "yellow", Math.random(), +new Date() )