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.

7 lines (6 loc) 257 B
/** * 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 const fromObject2D = ({ x, y }) => [x, y];