Original code is of questionable historical provenance, and was needlessly (it seems) complexity. New code is relatively simple arithmetic linear interpolation.
Original code is of questionable historical provenance, and was needlessly (it seems) complexity. New code is relatively simple arithmetic linear interpolation.