From 0266785921b80b6d9fbf011283002c24fa04d62e Mon Sep 17 00:00:00 2001 From: Mattrixwv Date: Fri, 30 Oct 2020 16:05:12 -0400 Subject: [PATCH] Adjusted variable names --- Algorithms.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Algorithms.hpp b/Algorithms.hpp index a62163c..38090f0 100644 --- a/Algorithms.hpp +++ b/Algorithms.hpp @@ -175,15 +175,15 @@ std::vector getNumPrimes(T numberOfPrimes){ //This function determines whether the number passed into it is a prime template -bool isPrime(T num){ - if(num <= 3){ - return num > 1; +bool isPrime(T possiblePrime){ + if(possiblePrime <= 3){ + return possiblePrime > 1; } - else if(((num % 2) == 0) || ((num % 3) == 0)){ + else if(((possiblePrime % 2) == 0) || ((possiblePrime % 3) == 0)){ return false; } - for(T cnt = 5;(cnt * cnt) <= num;cnt += 6){ - if(((num % cnt) == 0) || ((num % (cnt + 2)) == 0)){ + for(T cnt = 5;(cnt * cnt) <= possiblePrime;cnt += 6){ + if(((possiblePrime % cnt) == 0) || ((possiblePrime % (cnt + 2)) == 0)){ return false; } }