I am using QGIS 3.10. I am trying to make an angle of line from x-axis in 0-180 range. This picture shows what I'm trying to do.
I want green lines to have angle of 140 for the upper one and -52 for the lower one. There is some solutions like this:
(atan((xat(-1)-xat(0))/(yat(-1)-yat(0)))) * 180/3.14159 + (180 *(((yat(-1)-yat(0)) < 0) + (((xat(-1)-xat(0)) < 0 AND (yat(-1) - yat(0)) >0)*2)))
But this code starts measuring from North in clockwise direction but this does not work for me.
Is there any solution??
The best thing to do in my opinion is have a specific code in field calculator.