I am wondering how in javascript if i was given a number (say 10000) and then was given a percentage (say 35.8%)
how would I work out how much that is (eg 3580)
I use two very useful JS functions: http://blog.bassta.bg/2013/05/rangetopercent-and-percenttorange/
function rangeToPercent(number, min, max){ return ((number - min) / (max - min)); }
and
function percentToRange(percent, min, max) { return((max - min) * percent + min); }