Function rangeMap

from における valueto においていくつなのかをマッピングする

const result = rangeMap([0,100],[0,50],50);
console.log(result);
// 25