Synopsis

double mth_Get2DArea(long num_of_points, long ndim, double *points)

Purpose

Get the area of a 2D point set assuming counterclockwise orientation.

Description

Computes the area of a 2D closed point set assuming counterclockwise orientation will generate a postive area. Only the first two dimensional values for each point are used in the 2D area calculation. All other values are ignored.

Input

num_of_points

The number of points in the closed 2D point set.

ndim

The number of dimensions the set of points. Must be greater than or equal to two.

points

The point set.

Return

The area of the enclosed set of points (positive area == counterclockwise orientation).