MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / uniform

Function uniform

source/utils/Random.cpp:43–46  ·  view source on GitHub ↗

\brief uniformly distributed number [0;1)

Source from the content-addressed store, hash-verified

41
42//! \brief uniformly distributed number [0;1)
43static double uniform()
44{
45 return randgen() * 1.0 / static_cast<double>(MAX);
46}
47
48//! \brief uniformly distributed number [lo;hi)
49static double uniform(double lo, double hi)

Callers 3

randintFunction · 0.85
randuintFunction · 0.85
DoubleFunction · 0.85

Calls 1

randgenFunction · 0.85

Tested by

no test coverage detected