Function lerp

  • Performs linear interpolation on two vectors. Given vectors a and b and interpolation coefficient t, returns a + t * (b - a).

    Parameters

    • a: Vec2

      Operand vector.

    • b: Vec2

      Operand vector.

    • t: number

      Interpolation coefficient.

    • Optional dst: Vec2

      vector to hold result. If not passed in a new one is created.

    Returns Vec2

    The linear interpolated result.