A Vec2 is a Vec3 optimized for working in a plane. Vec2s have an always-zero z component.

import { Vec2 } from '@js-draw/math';

const v = Vec2.of(1, 2);
console.log('a Vec2:', v);
console.log('x component:', v.x);
console.log('z component:', v.z);

Index

Variables

Functions

OpenSource licenses