function distance({x, y}: {x: number, y: number}) { return Math.sqrt(x*x + y*y); }