mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 00:49:19 +02:00
Replace fancy Random function with std::uniform_real_distribution
This commit is contained in:
@@ -96,8 +96,8 @@ bool ClearFlag(int &Flag, int const Value)
|
||||
|
||||
double Random(double a, double b)
|
||||
{
|
||||
uint32_t val = Global.random_engine();
|
||||
return interpolate(a, b, (double)val / Global.random_engine.max());
|
||||
std::uniform_real_distribution<double> dist(a, b);
|
||||
return dist(Global.random_engine);
|
||||
}
|
||||
|
||||
int RandomInt(int min, int max)
|
||||
|
||||
Reference in New Issue
Block a user