Function lerp

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

    Parameters

    • a: Vec3

      Operand vector.

    • b: Vec3

      Operand vector.

    • t: number

      Interpolation coefficient.

    • Optional dst: Vec3

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

    Returns Vec3

    The linear interpolated result.