Initial commit

This commit is contained in:
Koper
2023-07-18 11:50:11 +07:00
parent 596b920484
commit a3802d054c
10 changed files with 509 additions and 122 deletions

21
app/utils.js Normal file
View File

@@ -0,0 +1,21 @@
export function getRandomNumber(min, max) {
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)
}
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;
}
}