diff options
Diffstat (limited to 'src/random.cpp')
-rw-r--r-- | src/random.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/random.cpp b/src/random.cpp index e94b191..73b226a 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -6,14 +6,12 @@ namespace ur { Random::Random(int min, int max) { - this->min = min; - this->max = max; // setup the random stuff unsigned seed = std::chrono::system_clock::now().time_since_epoch().count(); this->engine = std::default_random_engine(seed); // setup distribution - float range = float(max - min); + auto range = float(max - min); this->distribution = std::normal_distribution<float>(range / 2.f, range / 4.f); } |