/**
 * N-dimensional vector dot product
 * @param {number[]|Float32Array|Float64Array} a
 * @param {number[]|Float32Array|Float64Array} b
 * @param {number} n number of dimensions
 * @return {number}
 */
export function vector_dot(a, b, n) {
    let result = 0;

    for (let i = 0; i < n; i++) {
        result += a[i] * b[i]
    }

    return result;
}
