@jossmac/lil-libs
    Preparing search index...

    Function lerp

    • Linear interpolation between two values.

      • from: number

        Value at interpolation factor 0.

      • to: number

        Value at interpolation factor 1.

      • value: number

        Interpolation factor; typically in 0..1 but not clamped.

      from + (to - from) * value.

      lerp(0, 100, 0.25); // 25
      lerp(0, 100, 1.5); // 150 (not clamped; extrapolates beyond 0..1)