MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / samplePolyline

Function samplePolyline

ui/src/lib/screens-model.ts:575–579  ·  view source on GitHub ↗
(c: Curve, count = HIT_SAMPLES)

Source from the content-addressed store, hash-verified

573
574/** The curve as `count` points from source to target, for distance tests. */
575export function samplePolyline(c: Curve, count = HIT_SAMPLES): Point[] {
576 const out: Point[] = [];
577 for (let i = 0; i < count; i++) out.push(pointAt(c, i / (count - 1)));
578 return out;
579}
580
581function distanceToSegment(p: Point, a: Point, b: Point): number {
582 const dx = b.x - a.x;

Callers 3

buildStepsModelFunction · 0.90
buildOrderModelFunction · 0.90
buildScreensModelFunction · 0.85

Calls 2

pointAtFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected