MCPcopy Create free account
hub / github.com/LabSound/LabSound / random_float

Method random_float

include/LabSound/extended/Util.h:35–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33public:
34 UniformRandomGenerator() : rd(), gen(rd()) {}
35 float random_float() { return dist_full(gen); } // [0.f, 1.f]
36 float random_float(float b) { std::uniform_real_distribution<float> dist_user(0.f, b); return dist_user(gen); }
37 float random_float(float a, float b) { std::uniform_real_distribution<float> dist_user(a, b); return dist_user(gen); }
38 uint32_t random_uint(uint32_t b) { std::uniform_int_distribution<uint32_t> dist_int(0, b); return dist_int(gen); }

Callers 2

setGrainSourceMethod · 0.80
playMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected