Function lerpE

  • Element-wise linear interpolation between a and b based on tx, ty, tz and tw, where tx, ty, tz and tw are numbers between 0.0 and 1.0. The result is stored in c.

    The calculation is as follows: a.x and b.x are interpolated based on tx to give c.x, a.y and b.y are interpolated based on ty to give c.y, a.z and b.z are interpolated based on tz to give c.z, a.w and b.w are interpolated based on tw to give c.w.

    The result will be equal to a when tx, ty, tz and tw are all 0.0, equal to b when tx, ty, tz and tw are all 1.0, and halfway between a and b when tx, ty, tz and tw are all 0.5

    Parameters

    • a: Vec4

      the start x, y and z values - a 4-element vector object

    • b: Vec4

      the end x, y and z values - a 4-element vector object

    • tx: number

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

    • ty: number

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

    • tz: number

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

    • tw: number

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

    • c: Vec4

      a 4-element vector in which to store the result

    Returns Vec4

    c - the interpolation result

Generated using TypeDoc