Using JavaScript, I wish to convert a value between 1-100 to a corresponding value set between 1000-150000. What is the best approach for this? Comparing and multiplying / dividing array values, or is there an easier way?
Using JavaScript, I wish to convert a value between 1-100 to a corresponding value
Share
Let’s say you would want to obtain value for 42 in value set {1000-150000}, you would need to use this formula:
Thus simpliying with:
So,
f(0) = 1000,f(100) = 150000andf(50) = 75500.Using javascript: