Skip to content

Commit

Permalink
updating isaac
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevins Bartolomeo committed Apr 27, 2015
1 parent 3d7ef9e commit a8d1854
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions isaac.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,19 @@ var isaac = (function(){
return {a: acc, b: brs, c: cnt, m: m, r: r};
}

function random(){
return 0.5 + this.rand() * 2.3283064365386963e-10; // 2^-32
}

/* return class object */
return {
'reset': reset,
'seed': seed,
'prng': prng,
'rand': rand,
'random': random,
'internals': internals
};
})(); /* declare and execute */

/* public: output*/
isaac.random = function() {
return 0.5 + this.rand() * 2.3283064365386963e-10; // 2^-32
}
( "undefined" !== ( typeof( module ) ) ) && module.exports && ( module.exports = isaac );

0 comments on commit a8d1854

Please sign in to comment.