mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 22:09:19 +02:00
Refactor LocalRandom()
This commit is contained in:
@@ -135,8 +135,8 @@ std::string generate_uuid_v4()
|
|||||||
|
|
||||||
double LocalRandom(double a, double b)
|
double LocalRandom(double a, double b)
|
||||||
{
|
{
|
||||||
uint32_t val = Global.local_random_engine();
|
std::uniform_real_distribution<double> dist(a, b);
|
||||||
return interpolate(a, b, (double)val / Global.random_engine.max());
|
return dist(Global.local_random_engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FuzzyLogic(double Test, double Threshold, double Probability)
|
bool FuzzyLogic(double Test, double Threshold, double Probability)
|
||||||
|
|||||||
Reference in New Issue
Block a user