in src/utils/vec2.ts [18:30]
constructor(v?: unknown, y?: unknown) {
super(2);
if (v instanceof Vec2 || v instanceof Float32Array || (v instanceof Array && v.length === 2)) {
this[0] = v[0];
this[1] = v[1];
} else if (typeof v === "number" && typeof y === "number") {
this[0] = v;
this[1] = y;
} else if (typeof v === "number") {
this[0] = v;
this[1] = v;
}
}