diff options
author | Steph Enders <smenders@gmail.com> | 2023-02-26 10:43:21 -0500 |
---|---|---|
committer | Steph Enders <smenders@gmail.com> | 2023-02-26 10:43:21 -0500 |
commit | 975055e40938730cb09d151ba17bf8defd3b4adf (patch) | |
tree | c5a6051ceb45a1351428f79c22e28e61d8a0bf6a /src/random.cpp | |
parent | 0bf89ad39d4c3659f3164639e4fbe7ca074fa04a (diff) |
Code quality and improvements
I genuinely cannot remember what I was doing here, as I never committed
it. But basically - it looks like I used my IDE and fixed warnings and
improved some code blocks / references
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); } |