math-utils/area-polygon — pull request #1 by gagan-bansal (2014-06-25 08:42:16+00:00)
Title: 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.