djuna commited on
Commit
5cd151e
·
verified ·
1 Parent(s): f6d9192

refactor calculatePossibleRangeSize to be more readable

Browse files
Files changed (1) hide show
  1. index.html +1 -1
index.html CHANGED
@@ -132,7 +132,7 @@
132
  const divisors = [];
133
  for (let i = 1; i <= num; i++) {
134
  const quotient = num / i;
135
- if (num % i === 0 || (quotient % 0.5 === 0 && quotient !== Math.floor(quotient))) {
136
  divisors.push(i);
137
  }
138
  }
 
132
  const divisors = [];
133
  for (let i = 1; i <= num; i++) {
134
  const quotient = num / i;
135
+ if (Number.isInteger(quotient) || (quotient % 0.5 === 0 && !Number.isInteger(quotient))) {
136
  divisors.push(i);
137
  }
138
  }