Error while generate DNA with uniform()
rassoc
rassoc at posteo.de
Sat Sep 3 21:59:33 UTC 2022
On 9/3/22 23:18, Salih Dincer via Digitalmars-d-learn wrote:
> Clean-cut, thank you!
> It's very clear to me...
Nothing major, but instead of `uniform!"[]"(DNA.min, DNA.max)`, you can simply use `uniform!DNA`.
`uniform` considers the whole enum: https://github.com/dlang/phobos/blob/v2.100.1/std/random.d#L2561
"Random variate drawn from the uniform distribution across all possible values of the [...] enum
type T."
More information about the Digitalmars-d-learn
mailing list