Function dot

  • Find the dot product of 2 or more vectors.

    Parameters

    • Rest ...args: number[][]

      The vectors. (Each vector must have the same dimension)

    Returns number | undefined

    Returns the dot product.

    Since

    0.5.0

    Example

    dot([1, 2], [2, 3])
    // => (1 * 2) + (2 * 3) => 8