returns signed area

Area function returns signed area that is helpful to determine the orientation of polygon boundary. 

Another change: you are adding first point at end of the points array. I made a check that adds only if last point and first point are not same. Many times you get polygon points array that is already closed.