Skip to content

Instantly share code, notes, and snippets.

Andrew Berry AndrewBerry

  • Sydney, Australia
Block or report user

Report or block AndrewBerry

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
blixt / prng.js
Created Jul 29, 2014
A very simple, seedable JavaScript PRNG.
View prng.js
* Creates a pseudo-random value generator. The seed must be an integer.
* Uses an optimized version of the Park-Miller PRNG.
function Random(seed) {
this._seed = seed % 2147483647;
if (this._seed <= 0) this._seed += 2147483646;
You can’t perform that action at this time.