Turn sense of an angle constraint
64-bitWhether the angle between two constrained lines is measured counter-clockwise or clockwise after a mirror or a trim.
sign = +1 if atan2(u × v, u · v) ≥ 0, else −1
u and v are the two lines' end-minus-start vectors times their stored leg directions. The cross and dot products are ordinary 64-bit sums of two products each, and the sign is read with no tolerance.
const u = [(l1.x2 - l1.x1) * c.dirs[0], (l1.y2 - l1.y1) * c.dirs[0]], v = [(l2.x2 - l2.x1) * c.dirs[1], (l2.y2 - l2.y1) * c.dirs[1]];
out.sign = Math.atan2(u[0] * v[1] - u[1] * v[0], u[0] * v[0] + u[1] * v[1]) >= 0 ? 1 : -1;