Function Interpolate(min_a, max_a, mid_a, min_b, max_b)

This function returns a value interpolated based on the comparison between a mid value in a range of given min and max values