-
I've got a random function (literally) that appears to generate a good even spread of random figured, but only when the upper bound is 7. Change the bound to anything else and it starts to form patterns 🤔 rndvis.isthe.link/?code=let+seed+%3D+Date.now%28%29%3B%0Alet+ctr+%3D+0%3B%0A%0Afunction+random%28%29+%7B%0A++const+value+%3D+%28%28%28%28seed+%3E%3E+9%29+%26+1%29+%5E+%28%28seed+%3E%3E+1%29+%26+1%29%29+%3C%3C+15%29+%7C+%28seed+%3E%3E+1%29%3B%0A++seed+%3D+value%3B%0A++return+value%3B%0A%7D%0A%0Aexport+default+function+%28n%29+%7B%0A++ctr%2B%2B%3B%0A++let+index+%3D+random%28%29+%3E%3E+8%3B+%2F%2F+high+byte%0A++index+%26%3D+n%3B%0A++index+%2B%3D+ctr%3B%0A%0A++return+index+%25+n%3B%0A%7D&bound=7