let math = {} math.seed = 5; math.random = function(max, min) { max = max || 1; min = min || 0; math.seed = (math.seed * 9301 + 49297) % 233280; var rnd = math.seed / 233280.0; return min + rnd * (max - min); }; for (var i= 0; i<10; i++) { console.log(math.random() +"<br />"); }