In 2D, each vector (x, y) has two normals: (-y, x) and (y, -x), pointing in opposite directions.
Say I have a polygon and for each of it's edges I need to get the normal pointing outwards. In the picture below, the red normals:
For each edge of the shape, how can I decide if I need (-y, x) or (y, -x)?