The anticlockwise sweep from x's direction to y's, in (0, 2π].
x
y
double sweep(End x, End y) { var s = y.angle - x.angle; if (s <= 0) s += 2 * math.pi; return s; }