doubledist(const Point& a, const Point& b){ returnsqrt((b-a).dot(b-a)); }
//得线段交点 Point LineCross(const Point &a, const Point &b, const Point &c, const Point &d){ double u = a.cross(b, c), v = b.cross(a, d); return Point((c.x * v + d.x * u) / (u + v), (c.y * v + d.y * u) / (u + v)); }