weasel API - v0.8.0
    Preparing search index...

    Function flattenCubicWithArcLen

    • Like flattenCubic but also appends, for each new flattened point, its arc-length fraction t (relative to the polyline distance accumulated so far inside this curve) to arcOut. Caller then post-processes the segment's arcOut range by dividing each by the segment's total flattened arc length to yield t ∈ (0, 1].

      The returned values are cumulative distance from the segment start, not normalized fractions. Two-pass design (accumulate, then divide) keeps the recursive splitter simple — it doesn't need to know the total length up front.

      Parameters

      • x0: number
      • y0: number
      • x1: number
      • y1: number
      • x2: number
      • y2: number
      • x3: number
      • y3: number
      • tolerance: number
      • out: number[]
      • arcOut: number[]

      Returns number