3 ms·
Modern languages usually provide a generate integer in range primitive. Edit: Even C++ seems to have it nowadays in std::uniform_int_distribution
by im3w1l 2y ago
Modern languages usually provide a generate integer in range primitive.
Edit: Even C++ seems to have it nowadays in std::uniform_int_distribution
- jltsiren 2y agoThe C++ distributions are problematic, because the standard does not specify the algorithms. If you specify the generator and the seed, you can still get different random numbers on different platforms. Which is why applications that need reproducible results must use another library or implement their own distributions.