@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) • 584 B
TypeScript
import type { ArrayVector4D } from "./types.js";
/**
* Projects one 4D vector onto another.
* @param {ArrayVector4D} xyzw1 - First vector as `[x, y, z, w]`
* @param {ArrayVector4D} xyzw2 - Second vector as `[x, y, z, w]` to project onto
* @param {number} [m1] - Optional current magnitude (default: `magnitude4D(xyzw1)`)
* @param {number} [m2] - Optional current magnitude (default: `magnitude4D(xyzw2)`)
* @returns {ArrayVector4D} The projected vector
*/
export declare const project4D: (xyzw1: ArrayVector4D, xyzw2: ArrayVector4D, m1?: number, m2?: number) => ArrayVector4D;