//It remaps value (that has an expected range of low1 to high1) into a target range of low2 to high2).
float remap(float value,float start1,float stop1,float start2,float stop2){
return start2 + (value - start1) * (stop2 - start2) / (stop1 - start1);
}
备忘,总找不到