double mapValue(num value, num start1, num stop1, num start2, num stop2) { return (value - start1) / (stop1 - start1) * (stop2 - start2) + start2; }