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.

12 lines (11 loc) 292 B
/** * Creates a 4D vector from an object with x, y, z, w properties. * @param {{ x: number; y: number; z: number; w: number }} obj - Object with x, y, z, w properties * @returns {ArrayVector4D} 4D vector */ export const fromObject4D = ({ x, y, z, w }) => [ x, y, z, w, ];