bool equalSegment(segment a, segment b) { return zero(a.angle() - b.angle()); }
bool cmpSegment(segment a, segment b) { if (!zero(a.angle() - b.angle())) return a.angle() < b.angle(); return (a.b - a.a) / (b.a - a.a) < 0; }