yarn format

This commit is contained in:
Koper
2023-07-18 15:52:39 +07:00
parent 21aec04008
commit 9382ab13ab
15 changed files with 1235 additions and 281 deletions

View File

@@ -1,21 +1,19 @@
export function getRandomNumber(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
return Math.floor(Math.random() * (max - min + 1)) + min;
}
export function SeededRand(seed) {
seed ^= seed << 13
seed ^= seed >> 17
seed ^= seed << 5
return seed / (2 ** 32)
seed ^= seed << 13;
seed ^= seed >> 17;
seed ^= seed << 5;
return seed / 2 ** 32;
}
export function Mulberry32(seed) {
return function () {
var t = seed += 0x6D2B79F5;
t = Math.imul(t ^ t >>> 15, t | 1);
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
return ((t ^ t >>> 14) >>> 0) / 4294967296;
}
return function () {
var t = (seed += 0x6d2b79f5);
t = Math.imul(t ^ (t >>> 15), t | 1);
t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
};
}