Last active
November 25, 2015 13:12
-
-
Save IUnknown68/5ad7029387fc3a02153d to your computer and use it in GitHub Desktop.
Generate a 1-2-5-10-20-50... scale
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createScale(vals, iterations) { | |
var m = vals.length * iterations; | |
for (var n = 0; n < m; n++) { | |
var x = vals[n % vals.length] * Math.pow(10, Math.floor(n / vals.length)); | |
console.log(x); | |
} | |
} | |
createScale([1,2,5], 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment