@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) • 395 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromObject2D = void 0;
/**
* 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
*/
const fromObject2D = ({ x, y }) => [x, y];
exports.fromObject2D = fromObject2D;