webgl-letters/src/geometry/Vector2D.ts

11 lines
175 B
TypeScript

export default class Vector2D {
constructor(
public x: number,
public y: number,
) {}
add(other: Vector2D) {
this.x += other.x;
this.y += other.y;
}
}