def map_range(x, in_min, in_max, out_min, out_max):
    out_delta = out_max - out_min
    in_delta = in_max - in_min

    return (x - in_min) * out_delta / in_delta + out_min

def lerp(a, b, t):
    return (1.0 - t) * a + t * b


def map_range(x, in_min, in_max, out_min, out_max):
    out_delta = out_max - out_min
    in_delta = in_max - in_min

    return (x - in_min) * out_delta / in_delta + out_min

Add function for linear interpolation (lerp)
Add function for linear interpolation (lerp)

+ def lerp(a, b, t):
+     return (1.0 - t) * a + t * b
+ 
+ 
  def map_range(x, in_min, in_max, out_min, out_max):
      out_delta = out_max - out_min
      in_delta = in_max - in_min
  
      return (x - in_min) * out_delta / in_delta + out_min
  
Add function for linear interpolation (lerp)
## Code Before:
def map_range(x, in_min, in_max, out_min, out_max):
    out_delta = out_max - out_min
    in_delta = in_max - in_min

    return (x - in_min) * out_delta / in_delta + out_min

## Instruction:
Add function for linear interpolation (lerp)
## Code After:
def lerp(a, b, t):
    return (1.0 - t) * a + t * b


def map_range(x, in_min, in_max, out_min, out_max):
    out_delta = out_max - out_min
    in_delta = in_max - in_min

    return (x - in_min) * out_delta / in_delta + out_min
