| 33 | public: |
| 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); } |
no outgoing calls
no test coverage detected