From 975055e40938730cb09d151ba17bf8defd3b4adf Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Sun, 26 Feb 2023 10:43:21 -0500 Subject: 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 --- src/random.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/random.cpp') 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(range / 2.f, range / 4.f); } -- cgit v1.2.3-54-g00ecf