Answers for "function to interpolate range"

0

function to interpolate range

OldRange = (OldMax - OldMin)
if (OldRange == 0)
    NewValue = NewMin
else
{
    NewRange = (NewMax - NewMin)  
    NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin
}
Posted by: Guest on December-11-2020

Browse Popular Code Answers by Language