@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.
9 lines (8 loc) • 321 B
TypeScript
import type { ArrayVector4D } from "./types.js";
/**
* Calculates the squared magnitude of a 4D vector.
* Faster than magnitude for comparisons.
* @param {ArrayVector4D} xyzw - Vector as `[x, y, z, w]`
* @returns {number} The squared magnitude
*/
export declare const magnitudeSq4D: (xyzw: ArrayVector4D) => number;