Skip to content

Intermact API Reference / @intermact/core / cumulativeLengths

Function: cumulativeLengths()

cumulativeLengths(points, closed): object

Defined in: packages/core/src/geometry/sampling.ts:48

Prefix-sum arc lengths and the total length of a polyline.

Parameters

points

Float32Array

closed

boolean

Returns

object

cumulative

cumulative: Float32Array

total

total: number

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)