How do you generate a random double uniformly distributed between 0 and 1 from C++?
Of course I can think of some answers, but I'd like to know what the standard practice is, to have:
- Good standards compliance
- Good randomness
- Good speed
(speed is more important than randomness for my application).
Thanks a lot!
PS: In case that matters, my target platforms are Linux and Windows.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…