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

◆ get_brownian_motion()

MAYAFLUX_API double MayaFlux::get_brownian_motion ( double  start,
double  end 
)

Generates a Brownian motion value.

Parameters
startStarting value for Brownian motion
endUpper bound for scaling
Returns
Next value in the Brownian motion sequence

Uses the random number generator from the default engine configured for Brownian motion. Successive calls will evolve the internal state of the Brownian motion generator, creating a random walk effect. The "start" parameter can be used to set the initial position of the Brownian motion, while the "end" parameter can be used to scale the output range. The generator will maintain its state across calls, allowing for continuous evolution of the Brownian motion sequence.

Definition at line 40 of file API/Random.cpp.

41{
42 auto& engine = get_random_engine();
43 engine.set_algorithm(Kinesis::Stochastic::Algorithm::BROWNIAN);
44 return engine(start, end);
45}
Kinesis::Stochastic::Stochastic & get_random_engine()
Get reference to the default random engine.
Definition API/Random.cpp:9

References MayaFlux::Kinesis::Stochastic::BROWNIAN, and get_random_engine().

+ Here is the call graph for this function: