double distanceSS(const line& s, const line& t) { if (intersectSS(s, t)) return 0.0; return min(min(distancePS(s.a, t), distancePS(s.b, t)), min(distancePS(t.a, s), distancePS(t.b, s))); }
double distanceSS(const L &s, const L &t) { if (intersectSS(s, t)) return 0; return min(min(distanceSP(s, t[0]), distanceSP(s, t[1])), min(distanceSP(t, s[0]), distanceSP(t, s[1]))); }