For example, I have a number between 1~100 and I need to scale it to be between 20~80.
Examples:
1 scales to 20
100 scales to 80
50 scales to 50
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re looking for a function f such that :
Then
You get :
99a +20 = 80
Have a look at this question for more information :
Invert and convert slider value
Note: if 50 scales to 40 your transformation is not linear. So you need to look for another type of function:
f(x) = ax**2 + b x + c