Created
August 5, 2014 09:34
-
-
Save michiel/0b87859df60c8489ed53 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 logslider(pos) { | |
var minp = 0; | |
var maxp = 100; | |
var minv = Math.log(100); | |
var maxv = Math.log(10000000); | |
var scale = (maxv - minv) / (maxp - minp); | |
return Math.exp(minv + scale * (pos - minp)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment