#NEWLINE# def lerp( x , x0 , x1 , y0 , y1 ) : #NEWLINE# #INDENT# 'Linear interpolation of value y given min and max y values (y0 and y1),\n\tmin and max x values (x0 and x1), and x value.\n\t' #NEWLINE# return ( y0 + ( ( y1 - y0 ) * ( ( x0 - x0 ) / ( x1 - x0 ) ) ) )