Creates a Vec2 from an object containing x and y coordinates.
Vec2
x
y
import { Vec2 } from '@js-draw/math'; const v1 = Vec2.ofXY({ x: 3, y: 4.5 }); const v2 = Vec2.ofXY({ x: -123.4, y: 1 });
Creates a
Vec2
from an object containingx
andy
coordinates.Example