sonnar 8 left. random number fixed
This commit is contained in:
@@ -12,4 +12,10 @@ export const printObject = (obj, indent = 0) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const getRandomInt = (max) => {
|
||||
const array = new Uint32Array(1);
|
||||
window.crypto.getRandomValues(array);
|
||||
return Math.floor(array[0] / (0xFFFFFFFF + 1) * (max + 1));
|
||||
};
|
||||
Reference in New Issue
Block a user