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

Function boundPoints

stackgl_modules/index.js:8911–8923  ·  view source on GitHub ↗
(points)

Source from the content-addressed store, hash-verified

8909
8910// Convert a list of points into bounding boxes by duplicating coords
8911function boundPoints (points) {
8912 var bounds = new Array(points.length)
8913 for (var i = 0; i < points.length; ++i) {
8914 var p = points[i]
8915 bounds[i] = [
8916 nextafter(p[0], -Infinity),
8917 nextafter(p[1], -Infinity),
8918 nextafter(p[0], Infinity),
8919 nextafter(p[1], Infinity)
8920 ]
8921 }
8922 return bounds
8923}
8924
8925// Find all pairs of crossing edges in a pslg (given edge bounds)
8926function getCrossings (points, edges, edgeBounds) {

Callers 2

preRoundFunction · 0.85
snapRoundFunction · 0.85

Calls 1

nextafterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…