Function lerpE

  • Element-wise linear interpolation between a and b based on tx, ty and tz, where tx, ty and tz 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.

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

    Parameters

    • a: Vec3

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

    • b: Vec3

      the end x, y and z values - a 3-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]

    • c: Vec3

      a 3-element vector in which to store the result

    Returns Vec3

    c - the interpolation result

Generated using TypeDoc