export class Point { constructor(x, y){ this.x = x; this.y = y; } scale(x, y) { this.x *= x; this.y *= y; } distanceTo(point) { return Math.hypot(point.x - this.x, point.y - this.y); } equals(point) { return point.x == this.x && point.y == this.y } }