Find the angle between two lines given their angles I'd like to find the angle between two lines given the angle of the lines from their positive x axis. The lines form a path but I am looking for the angle between the two lines. The angles of the two lines A and B can be in the range 0 deg to 359 deg. I am looking for C - the angle between the two lines. Refer to the image for a better illustration:

 A: Based on the image, due to the angle of the part below the dotted line being $A$ and the part above's angle being the supplement of $B$, you have
$$C = A + (180^{o} - B) = 180^{o} + A - B \tag{1}\label{eq1}$$
This is basically assuming that $0 \le A,B \le 180^{o}$. However, as your question text says $A$ and $B$ can be up to $359^{o}$, I'm not sure how you define your $C$ where either $A$ or $B$ is more than $180^{o}$. Based on the OP's later question comment to require $C \lt 180^{o}$, one way to do that is to have \eqref{eq1} be modulo $180^{o}$, i.e., add or subtract $180^{o}$, as needed, until $0 \le C \lt 180^{o}$.
A: If you extend the first line a bit, you see that the angle, going counterclockwise from the first line until you reach the second line, is given by $B-A$. If you want the supplement of that angle, as seems to be the case from your diagram, you'll want $180 - (B-A) = 180 + A - B.$
Note that the answer depends very much on your conventions for how you're labeling the lines and angles. I'm assuming here that your diagram is accurate.
