SQLite Forum

Recursive CTE
Login
The differences between angles of successive vectors as you traverse the polygon (including the last-to-first segment angle) will sum to either +360 or -360 degrees depending upon the traversal direction, unless it crosses itself.

If you lookup the algorithm for determining whether a point is inside a polygon, you will find that it also reveals the same information.