In this function, divide the polygon into trapezias by both ends of polygon's borders, then for every trapezium, calculate its area by (y1+y2)*(x2-x1)/2, that is also why sometimes it will get a negative area value.
Data types supported:
double: ocmath_d_polygon_area
float: ocmath_f_polygon_area
POINT: ocmath_l_polygon_area
float ocmath_f_polygon_area(float* pX, float* pY, uint nSize)
Polygon area.
ocmath_d_polygon_area, ocmath_l_polygon_area
origin.h