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.

10 lines (9 loc) 432 B
import type { ArrayVector2D } from "./types.js"; /** * Rotates a 2D point around an arbitrary axis point * @param {ArrayVector2D} xy - Point to rotate * @param {number} phi - Rotation angle in radians * @param {ArrayVector2D} axis - Rotation axis point (default: `[0, 0]`) * @returns {ArrayVector2D} The rotated vector */ export declare const rotate2D: (xy: ArrayVector2D, phi: number, axis?: ArrayVector2D) => ArrayVector2D;