mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-30 02:07:10 +01:00
A Smooth drag gave each curved segment in reach at least one measured piece of its share of MAX_REACH_PIECES, measured the whole of every curved segment it passed, counted or not, and charged a segment's own share one piece per call while each halving measured two, so the total grew past the limit when more curved segments than the limit were in reach, and a long curve measured a few pieces more than its share. path.smoothRegion now keeps one count of the pieces the whole drag may measure past the first measurement of each curved segment. A piece is halved only when two pieces are left both in the segment's share and in the drag's count, and both halves are taken from each before either is measured. A drag measures at most 131,072 pieces plus one for each curved segment it searches, the segments in reach still share the search equally whatever order they come in, and a segment searched after the count runs out is still found in reach at its middle or its point nearest the drag. Docs: docs/mcp.md (path.smoothRegion), docs/target-app-parity.md.