static LineWithColor sortLineByY(LineWithColor l) { if (l.a.y > l.b.y) { Pt p = l.a; l.a = l.b; l.b = p; } ret l; }