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) 355 B
import type { ArrayVector2D } from "./types.js"; /** * Creates an `ArrayVector2D` from an object with x and y properties. * @param {{ x: number, y: number }} vector2D - Object with x and y properties * @returns {ArrayVector2D} 2D vector as an array */ export declare const fromObject2D: ({ x, y }: { x: number; y: number; }) => ArrayVector2D;