num distance(Vector vec) { final xd = x - vec.x; final yd = y - vec.y; return sqrt(xd * xd + yd * yd); }