When using
angle_at_vertex($geometry,0)
324.022
in the Field Calculator of QGIS the values seem correct from a visual check. However when using
feature.geometry().angleAtVertex(0)
5.616644978134382
in PyQGIS it returns a different value that doesn't appear to be right.
So far I made sure that the layer's CRS and the project's CRS are the same but I am still getting the same different values. What am I missing out on?