Is there a function that allows you to scale an integer to another one?
For example:
1 2 3 4 5 6 7
int a; //int with a value between 1-100;
int b; //int with a value between 100-1000;
int c = scale(a,1,100,b,100,1000);
//scale a up to b
//the bigger the value of a, the bigger the returned value, to a maximum of 1000
//Ex: if a is 100, returns 1000
//the returned value is beween 100-1000