generating random numbers

bachmeier no at spam.net
Mon Aug 10 15:13:51 UTC 2020


On Monday, 10 August 2020 at 14:20:23 UTC, bachmeier wrote:
> On Monday, 10 August 2020 at 05:51:07 UTC, Andy Balba wrote:
>> generating random numbers using 
>> https://dlang.org/library/std/random/uniform01.html
>>
>> I find the example given in this section totally 
>> incomprehensible
>> .. Can any help me answer two simple questions:
>> How to generate a random floating number in range [0,1) ?
>> How to set a seed value, prior to generating random values ?
>
> Strange example for sure. I'd recommend checking out the 
> examples on the landing page for std.random: 
> https://dlang.org/library/std/random.html

I created a PR with a hopefully clearer example:
https://github.com/dlang/phobos/pull/7588


More information about the Digitalmars-d-learn mailing list