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"; /** * Calculates the angle between two 3D vectors. * @param {ArrayVector3D} xyz1 - First vector as `[x, y, z]` * @param {ArrayVector3D} xyz2 - Second vector as `[x, y, z]` * @param {number} [m1] - Optional first vector magnitude (default: `magnitude3D(xyz1)`) * @param {number} [m2] - Optional second vector magnitude (default: `magnitude3D(xyz2)`) * @returns {number} Angle between the vectors in radians */ export declare const angleBetween3D: (xyz1: ArrayVector3D, xyz2: ArrayVector3D, m1?: number, m2?: number) => number;