初始化fy

This commit is contained in:
yziiy
2025-08-11 11:51:38 +08:00
parent 98ce20e897
commit 7e21160e13
19770 changed files with 3108698 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
exports = function(seed) {
var min =
arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var max =
arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
var floating =
arguments.length > 3 && arguments[3] !== undefined
? arguments[3]
: true;
return function() {
seed = (seed * 9301 + 49297) % 233280;
var rnd = seed / 233280.0;
rnd = min + rnd * (max - min);
return floating ? rnd : Math.floor(rnd);
};
};
module.exports = exports;