CPolygon:PathLen
The PathLen method calculates the path length along the vertices of the CPolygon. The polygon does not need to be convex.
nLen = CPolygon:PathLen() where |
nLen is the path length from index 1 to Count through the polygon indices.
The following script creates a CPolygon from 2 data arrays, x, and y, and then calculates its path length:
|
-- create CPolygon A |
|
-- result: PathLen = 19.5755 |