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.
adds first point to last if first point is not equal to last. There are cases where many times first point is already exit as last point in input array.