I have been working on a 2-dimensional object creator program that handles manipulations of arbitrary shapes and calculates collision detection between them. The program allows you to input a shape's coordinates, and from there it will do whatever else you want it to do (draw the shape to the screen, expand the border, manipulate individual coordinates, make it symmetrical, etc.).
But I've run into a problem when trying to calculate the interior angles of an arbitrary polygon. While the algorithm's I've used to calculate the angles technically output the correct angle, I have no way of telling whether or not the program spits out an interior angle or an exterior angle (since the arbitrary shape the user inputs could have concave vertices).
On paper this would seem like a piece of cake, since you can visualize the shape and you can interpret which angle is interior and exterior automatically. But since the program only stores the values of the coordinates and doesn't actually visually create the object to extrapolate data, this problem becomes a little bit trickier to solve.
So my question is:
What method should I use to calculate the angle between two lines and how should I go about using it to determine the difference between an interior and an exterior angle?
For example, if I have a shape that has coordinates $((30,50),(35,47),(40,50),(37,43),(35,35),(33,43))$ (which ends up looking sort of like an upside-down spire with a concave base), I can easily calculate the angles between the lines, but which angle I am calculating is a mystery.