• Mix (interpolate) vectors (similar to glsl implementation).

    Type Parameters

    Parameters

    • a: T

      Vector to interpolate from

    • b: VectorLike

      Vector to interpolate to

    • t: number

      Interpolation parameter, 0 = a and 1 = b

    • target: T = a

      Target for storing the results (Default: a)

    Returns T

    The interpolated vector

    Example

    mix([1, 3], [3, 5], 0.5, new Array(2)); // Returns: [2, 4]
    

Generated using TypeDoc