logoalt Hacker News

Dylan16807 • today at 12:13 AM • 0 replies • view on HN

Wow that page really gets lost in the weeds of multiple dimensions.

And yeah it's just rerolling when your random number is out of range. If you want it as simple as possible, always generate from 0-n, and grab barely enough random bits for n to fit.