MCPcopy Create free account
hub / github.com/algorithm-archivists/algorithm-archive / drand

Function drand

contents/IFS/code/cpp/IFS.cpp:25–27  ·  view source on GitHub ↗

Returns a random double in [0, 1)

Source from the content-addressed store, hash-verified

23
24// Returns a random double in [0, 1)
25double drand() {
26 return std::uniform_real_distribution<double>(0.0, 1.0)(rng());
27}
28
29// Returns a random integer in [0, numElems-1]
30std::size_t randrange(std::size_t numElems) {

Callers 1

chaosGameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected