Reference line
Angle
The angle W1 or W2 is calculated as sum of
The result is dependent on the line direction.