📅  最后修改于: 2022-03-11 14:59:59.627000             🧑  作者: Mango
function scale (number, inMin, inMax, outMin, outMax) {
return (number - inMin) * (outMax - outMin) / (inMax - inMin) + outMin;
}