Returns the euclidean distance between two vectors.
double distance(Vector v2) => sqrt((x - v2.x) * (x - v2.x) + (y - v2.y) * (y - v2.y));