![]() |
VCV Rack API
v1
|
Random number generator. More...
Functions | |
void | init () |
Initializes the thread-local RNG state. More... | |
uint32_t | u32 () |
Returns a uniform random uint32_t from 0 to UINT32_MAX. More... | |
uint64_t | u64 () |
Returns a uniform random uint64_t from 0 to UINT64_MAX. More... | |
float | uniform () |
Returns a uniform random float in the interval [0.0, 1.0) More... | |
float | normal () |
Returns a normal random number with mean 0 and standard deviation 1. More... | |
Random number generator.
void rack::random::init | ( | ) |
Initializes the thread-local RNG state.
Must call per-thread, otherwise the RNG will always return 0.
uint32_t rack::random::u32 | ( | ) |
Returns a uniform random uint32_t from 0 to UINT32_MAX.
uint64_t rack::random::u64 | ( | ) |
Returns a uniform random uint64_t from 0 to UINT64_MAX.
float rack::random::uniform | ( | ) |
Returns a uniform random float in the interval [0.0, 1.0)
float rack::random::normal | ( | ) |
Returns a normal random number with mean 0 and standard deviation 1.