Function Aux::Random::real()

Function Documentation

double Aux::Random::real()

Warning

Compared to obtaining a reference to a generator using getURNG() and then using a local std::uniform_real_distribution, this method incurs a slow-down of up to 30%. Consider avoiding it in hot sections.

Parameters:
  • upperBound – default = 1.0

  • lowerBound – default = 0.0

Returns:

a double distributed uniformly in a half-open range: [lowerBound, upperBound)