@fimbul-works/vec
Version:
A comprehensive TypeScript vector math library providing 2D, 3D, and 4D vector operations with a focus on performance and type safety.
11 lines (10 loc) • 559 B
TypeScript
import type { ArrayVector2D } from "./types.js";
/**
* Projects one 2D vector onto another.
* @param {ArrayVector2D} xy1 - Vector to project
* @param {ArrayVector2D} xy2 - Vector to project onto
* @param {number} [m1] - Optional magnitude of the first vector (default: `magnitude2D(xy1)`)
* @param {number} [m2] - Optional magnitude of the second vector (default: `magnitude2D(xy2)`)
* @returns {ArrayVector2D} The projected vector
*/
export declare const project2D: (xy1: ArrayVector2D, xy2: ArrayVector2D, m1?: number, m2?: number) => ArrayVector2D;