I'm currently implementing an algorithm to split a concave polygon into y-monotone polygons, so I can triangulate those. As I writing this for my own little library, I'm implementing one of the algorithms I saw during a lecture once.
This algorithm needs to known the inner angle between three vertices of the polygon, but I'm not sure how to compute these. For clarification: I'd like to know the angle indicated in red in the following image:
I would like to solve for the red angle. I've found a formula online that uses atan() but I'm totally not sure how this works and thus I have no idea how to compute this inner angle.

I think I've found a solution. If I loop over my points in a certain order, and I know if the points are cw or ccw connected, I can conclude what is the inner part.
For example. If I loop over my points clockwise:
If three ordered vertices are connected clockwise, I know that I should take the angle < 90°
If three ordered vertices are connected counterclockwise, I know that I should take the angle > 90°