MCPcopy Create free account
hub / github.com/Signalsmith-Audio/reverb-example-code / randomInRange

Function randomInRange

reverb-example-code.h:7–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <cstdlib>
6
7double randomInRange(double low, double high) {
8 // There are better randoms than this, and you should use them instead 😛
9 double unitRand = rand()/double(RAND_MAX);
10 return low + unitRand*(high - low);
11}
12
13// This is a simple delay class which rounds to a whole number of samples.
14using Delay = signalsmith::delay::Delay<double, signalsmith::delay::InterpolatorNearest>;

Callers 1

configureMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected