UNPKG

@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) 582 B
import type { ArrayVector3D } from "./types.js"; /** * Projects one 3D vector onto the second. * @param {ArrayVector3D} xyz1 - Vector to project * @param {ArrayVector3D} xyz2 - Vector to project onto * @param {number} [m1] - Optional magnitude of the vector to project (default: `magnitude3D(xyz1)`) * @param {number} [m2] - Optional magnitude of the vector to project onto (default: `magnitude3D(xyz2)`) * @returns {ArrayVector3D} The projected vector */ export declare const project3D: (xyz1: ArrayVector3D, xyz2: ArrayVector3D, m1?: number, m2?: number) => ArrayVector3D;