mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
MeasureCalc: Added "UniqueRandom" option. When "1", random numbers are only used once within the range {LowBound, HighBound}.
Also updated the URNG (Uniform Random Number Generator) engine to the C++11 library <random>.
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
#define __MEASURECALC_H__
|
||||
|
||||
#include "Measure.h"
|
||||
#include <random>
|
||||
|
||||
class MeasureCalc : public Measure
|
||||
{
|
||||
@ -46,8 +47,14 @@ private:
|
||||
int m_HighBound;
|
||||
|
||||
bool m_UpdateRandom;
|
||||
bool m_UniqueRandom;
|
||||
|
||||
static bool c_RandSeeded;
|
||||
std::vector<int> m_UniqueNumbers;
|
||||
void UpdateUniqueNumberList();
|
||||
|
||||
// Uniform Random Number Generator
|
||||
std::default_random_engine m_Engine;
|
||||
std::uniform_int_distribution<int> m_Distrubtion;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user