Speed settings logic improvements

This commit is contained in:
Sam Potts
2020-02-10 18:34:05 +00:00
parent ff8dedd4ec
commit 1619510dcf
6 changed files with 22 additions and 26 deletions

View File

@ -21,11 +21,3 @@ export function closest(array, value) {
return array.reduce((prev, curr) => (Math.abs(curr - value) < Math.abs(prev - value) ? curr : prev));
}
export function fillRange(start, end, step = 1) {
const len = Math.floor((end - start) / step) + 1;
return Array(len)
.fill()
.map((_, idx) => start + idx * step);
}