Add random seed button

This commit is contained in:
Misode
2024-10-27 05:39:04 +01:00
parent 88b8730b72
commit 446e04879c
3 changed files with 21 additions and 6 deletions
+5 -1
View File
@@ -30,7 +30,11 @@ export function hexId(length = 12) {
}
export function randomSeed() {
return BigInt(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER))
return BigInt(Math.floor((Math.random() - 0.5) * 2 * Number.MAX_SAFE_INTEGER))
}
export function randomInt() {
return Math.floor(Math.random() * 4294967296) - 2147483648
}
export function generateUUID() {