Skip to content

Commit

Permalink
fix random number bug (with {max: 0})
Browse files Browse the repository at this point in the history
  • Loading branch information
linkkingjay committed Dec 26, 2014
1 parent fbe1414 commit c1079cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vendor/mersenne.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ gen.init_genrand((new Date).getTime() % 1000000000);

// Added max, min range functionality, Marak Squires Sept 11 2014
exports.rand = function(max, min) {
if (!max)
if (max === undefined)
{
min = 0;
max = 32768;
Expand Down

0 comments on commit c1079cb

Please sign in to comment.