Struct GeodesicPolygonResult

Perimeter and signed area of the polygon formed by the supplied vertices.

struct GeodesicPolygonResult(T)
  
if (isGeodesyScalar!T);

Read pointCount for the number of vertices, perimeter for total boundary length in the ellipsoid's linear unit, and signedArea for area in that unit squared. Positive area indicates counterclockwise vertex order; reversing the order changes the sign.

Properties

NameTypeDescription
perimeter[get] TClosed geodesic perimeter in the ellipsoid linear unit.
pointCount[get] size_tNumber of vertices supplied to the accumulator.
signedArea[get] TCanonical signed area in square ellipsoid units.

Example

Example reading an initialized polygon result carrier.

GeodesicPolygonResult!double result;

assert(result.pointCount == 0);
assert(result.perimeter == 0.0);
assert(result.signedArea == 0.0);