[refactor] Moved 'getRandomInt' to its own TS file

This commit is contained in:
Steven Evans
2018-07-04 20:35:33 -04:00
parent 39c9488768
commit be9891d93b
9 changed files with 24 additions and 13 deletions
-6
View File
@@ -214,11 +214,6 @@ function clearSelector(selector) {
}
}
function getRandomInt(min, max) {
if (min > max) {return getRandomInt(max, min);}
return Math.floor(Math.random() * (max - min + 1)) + min;
}
//Returns true if all elements are equal, and false otherwise
//Assumes both arguments are arrays and that there are no nested arrays
function compareArrays(a1, a2) {
@@ -246,7 +241,6 @@ export {sizeOfObject,
clearObject,
addOffset,
clearEventListeners,
getRandomInt,
compareArrays,
printArray,
powerOfTwo,