@sstorsveen/maths - v2.0.1
    Preparing search index...

    Function lerp

    • Linear interpolation between a and b based on t, where t is a number between 0.0 and 1.0. The result is stored in c.

      The result will be equal to a when t is 0.0, equal to b when t is 1.0, and halfway between a and b when t is 0.5

      Parameters

      • a: Vec2

        the start value - a 2-element vector object

      • b: Vec2

        the end value - a 2-element vector object

      • t: number

        a floating point number in the interval [0.0, 1.0]

      • c: Vec2

        a 2-element vector in which to store the result

      Returns Vec2

      c - the interpolation result