export class Vec2 { constructor( private readonly x: number, private readonly y: number, ) {} public distance_to(that: Vec2): number { return Math.sqrt((this.x - that.x) ** 2 + (this.y - that.y) ** 2); } }