MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_uniform_random()

MAYAFLUX_API double MayaFlux::get_uniform_random ( double  start = 0,
double  end = 1 
)

Generates a uniform random number.

Parameters
startLower bound (inclusive)
endUpper bound (exclusive)
Returns
Random number with uniform distribution

Uses the random number generator from the default engine.

Definition at line 13 of file Random.cpp.

14{
15 get_context().get_random_engine()->set_type(Utils::distribution::UNIFORM);
16 return get_context().get_random_engine()->random_sample(start, end);
17}
Nodes::Generator::Stochastics::Random * get_random_engine()
Gets the stochastic signal generator engine.
Definition Engine.hpp:274
void set_type(Utils::distribution type)
Changes the probability distribution type.
double random_sample(double start, double end)
Generates a stochastic value within a specified range.
Core::Engine & get_context()
Gets the default engine instance.
Definition Core.cpp:56

References get_context(), MayaFlux::Core::Engine::get_random_engine(), MayaFlux::Nodes::Generator::Stochastics::Random::random_sample(), MayaFlux::Nodes::Generator::Stochastics::Random::set_type(), and MayaFlux::Utils::UNIFORM.

+ Here is the call graph for this function: