import { spline2_bezier } from "../../math/spline/spline2_bezier.js";

/**
 *
 * @param {Vector2} result
 * @param {number} p0x
 * @param {number} p0y
 * @param {number} p1x
 * @param {number} p1y
 * @param {number} p2x
 * @param {number} p2y
 * @param {number} t
 */
export function spline_bezier2_2d(
    result,
    p0x, p0y,
    p1x, p1y,
    p2x, p2y,
    t
) {

    const x0 = spline2_bezier(t, p0x, p1x, p2x);
    const y0 = spline2_bezier(t, p0y, p1y, p2y);

    result.set(x0, y0);
}
