OpenVDB
12.0.0
|
Simple generator of random numbers over the range [0, 1) More...
#include <openvdb/math/Math.h>
Public Types | |
using | ValueType = FloatType |
Public Member Functions | |
Rand01 (const EngineType &engine) | |
Initialize the generator. More... | |
Rand01 (unsigned int seed) | |
Initialize the generator. More... | |
void | setSeed (unsigned int seed) |
Set the seed value for the random number generator. More... | |
const EngineType & | engine () const |
Return a const reference to the random number generator. More... | |
FloatType | operator() () |
Return a uniformly distributed random number in the range [0, 1). More... | |
Simple generator of random numbers over the range [0, 1)
Thread-safe as long as each thread has its own Rand01 instance
using ValueType = FloatType |
|
inline |
Initialize the generator.
engine | random number generator |
|
inline |
Initialize the generator.
seed | seed value for the random number generator |
|
inline |
Return a const reference to the random number generator.
|
inline |
Return a uniformly distributed random number in the range [0, 1).
|
inline |
Set the seed value for the random number generator.