Another way would be to use vector math. You can define two 3D vectors.
This might not be as useful for top-down flat 2D stuff, the above posts would be better, but for getting angles in 3D:
(this is just basically pseudo code to demonstrate the math)
(these are 3D vectors btw)
vec1 = line1_end - line1_start
vec2 = line2_end - line2_start
Then you would normalize these vectors.
vec1 = vec1 / vec1_length
vec2 = vec2 / vec2_length
Then you take the Dot Product of the two normals, which gives you the cos(Angle) between them.
cosAngle# = DotProduct(vec1,vec2)
Now, to get our final angle, we take the arc cosine value like this:
Angle# = aCos(cosAngle#)
---
This example gives the absolute degrees between two vectors. And could be used in the above question with the first vector pointing "forward" in the world. Then that would give you the degrees from this forward vector.
Someone might have use for this anyhow