Of the use of unpredictableSeed

cym13 via Digitalmars-d digitalmars-d at puremagic.com
Sun Feb 26 22:16:07 PST 2017


On Monday, 27 February 2017 at 04:51:37 UTC, Nick Sabalausky 
(Abscissa) wrote:
> On 02/26/2017 01:23 PM, cym13 wrote:
>>
>> [1]: https://cym13.github.io/article/unpredictableSeed.html
>
> Good enlightening article. And Veles looks cool, never heard of 
> it before.
>
> One detail:
>
> auto copyState(uint origin) {
>     for (uint i=1; i>0; i++) {
>         if (origin == Random(i).front)
>             return origin;
>     }
>     return 0;
> }
>
> Shouldn't "return origin;" be "return i;"?

Yes, it should completely be "return i;", thanks for noticing 
I'll correct it.


More information about the Digitalmars-d mailing list