def inverse_lerp(a: float, b: float, c: float) -> float:
    """
    Inverse function to `lerp`.  Calculates t such that lerp(a, b, t) = c.
    (will divide by zero if a = b)
    """
    return (c - a) / (b - a)