How to get the exterior angle of a polygon