Module geo.metric

Euclidean distance, length, and nearest-point operations.

Date

September 12, 2026

Functions

NameDescription
distance(a, b) Euclidean distance between two points.
polylineLength(polyline) Euclidean length of a polyline.
segmentLength(segment) Euclidean length of a segment.
squaredDistance(a, b) Squared Euclidean distance between two points.
tryNearestPoint(segment, point, result) Finds the nearest point on a segment to a point.
tryPointSegmentDistance(segment, point, result) Computes the Euclidean distance from a point to a segment.
tryPointSegmentDistance(point, segment, result) Deprecated v1 point-first overload.

Aliases

NameTypeDescription
MetricScalar real Floating-point computation type used by elementary metric operations.