MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / getClosestPathPointPercent

Function getClosestPathPointPercent

packages/@stdlib/misc/src/svg.ts:20–22  ·  view source on GitHub ↗
(path: SVGPathElement, pos: Vec2)

Source from the content-addressed store, hash-verified

18}
19
20export function getClosestPathPointPercent(path: SVGPathElement, pos: Vec2) {
21 return getClosestPathPointLength(path, pos) / path.getTotalLength();
22}

Callers 1

grabMethod · 0.90

Calls 1

Tested by

no test coverage detected