Hacker News new | ask | show | jobs
by lern_too_spel 1637 days ago
floor is unnecessary. The cast does it for you. The problem is that a random double is not going to be evenly distributed into length equal parts unless length is a power of 2.