Open
Description
chuck 1.4.2 appears to have broken Spectacle and Multicomb (RNG) by undefining RAND_MAX.
Seems like an opportunity to modernize and decouple. Both chugins want a rand2f function.
Here's a simple+modern+portable one.
#include <random>
float rand2f (float min, float max)
{
static std::mt19937 s_mt;
static std::uniform_real_distribution<float> s_dist(0.f, 1.f);
float x = s_dist(s_mt);
return min + x * (max - min);
}
Metadata
Metadata
Assignees
Labels
No labels