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.

8 lines (7 loc) 311 B
import type { ArrayVector2D } from "./types.js"; /** * Gets the angle between a 2D vector and the positive x-axis in radians. * @param {ArrayVector2D} xy - Vector as `[x, y]` * @returns {number} Angle in radians, always in the range [0, 2π) */ export declare const angleX2D: (xy: ArrayVector2D) => number;