import { assert } from "../../assert.js";

/**
 * Vector DOT product in 2D
 * @param {number} x0
 * @param {number} y0
 * @param {number} x1
 * @param {number} y1
 * @returns {number}
 */
export function v2_dot(x0, y0, x1, y1) {
    assert.isNumber(x0, 'x0');
    assert.isNumber(y0, 'y0');
    assert.isNumber(x1, 'x1');
    assert.isNumber(y1, 'y1');

    return (x0 * x1 + y0 * y1);
}