Expand description
Arc lengths of path segments, from + - * / and sqrt alone.
kurbo’s arc length calls powi and powf, which are the platform’s
math library when kurbo’s std is on; these integrate the speed with a
fixed 16-point Gauss-Legendre rule, halving a segment while the halves
disagree with the whole, so the result is the same bits everywhere.
Constants§
- ACCURACY
- How close an arc length is computed, in pixels: the halving stops once the halves agree with the whole within this.
Functions§
- length
- The length of the whole of
segment. - length_
between - The length of
segmentbetween parameterst0andt1. - parameter_
at - The parameter at which
segmenthas rundistanceof itstotallength (whichlengthgave), withinACCURACY; 0 or 1 past its ends. - point_
at - The point at parameter
t, as kurbo evaluates it (Bernstein form,+ - *only).