Tyro[a.c.edwards] wrote:
http://www.digitalmars.com/d/2.0/phobos/std_random.html#uniformAbove documentation provides the following example: Random gen(unpredictableSeed); // Generate an integer in [0, 1023] auto a = uniform(0, 1024, gen); // Generate a float in [0, 1) auto a = uniform(0.0f, 1.0f, gen); Which, when complied, produces the following errors:
It would be cool if DDoc could incorporate unittest examples -- it's in a doc comment and a unittest, changes automatically propagated between the two, so if your unittest succeeds, the documentation is probably at least somewhat correct.
