Created
July 5, 2018 15:10
-
-
Save mr21/03eb4074ca18be8b64c52429a871e33b to your computer and use it in GitHub Desktop.
A better random if needed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Random() { | |
return crypto.getRandomValues( Random.arr )[ 0 ] / Random.limit; | |
} | |
Random.limit = 2 ** 32; | |
Random.arr = new Uint32Array( 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment