interpolateInternalSingleProc function
Implementation
double interpolateInternalSingleProc(
double value, double inS, double inE, double outS, double outE) {
double progress = (value - inS) / (inE - inS);
double resultForNonZeroRange = (outS + (progress * (outE - outS)));
double result;
if (inS == inE) {
if (value <= inS) {
result = outS;
} else {
result = outE;
}
} else {
result = resultForNonZeroRange;
}
return result;
}