MCPcopy Index your code
hub / github.com/plotly/plotly.js / ptDist

Function ptDist

src/traces/scatter/line_points.js:122–126  ·  view source on GitHub ↗
(pt1, pt2)

Source from the content-addressed store, hash-verified

120 }
121
122 function ptDist(pt1, pt2) {
123 var dx = pt1[0] - pt2[0];
124 var dy = pt1[1] - pt2[1];
125 return Math.sqrt(dx * dx + dy * dy);
126 }
127
128 // last bit of filtering: clip paths that are VERY far off-screen
129 // so we don't get near the browser's hard limit (+/- 2^29 px in Chrome and FF)

Callers 2

line_points.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…