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

Function boundary

stackgl_modules/index.js:6264–6293  ·  view source on GitHub ↗
(cells)

Source from the content-addressed store, hash-verified

6262module.exports = boundary
6263
6264function boundary (cells) {
6265 var i, j, k
6266 var n = cells.length
6267 var sz = 0
6268 for (i = 0; i < n; ++i) {
6269 sz += cells[i].length
6270 }
6271 var result = new Array(sz)
6272 var ptr = 0
6273 for (i = 0; i < n; ++i) {
6274 var c = cells[i]
6275 var d = c.length
6276 for (j = 0; j < d; ++j) {
6277 var b = result[ptr++] = new Array(d - 1)
6278 var p = 0
6279 for (k = 0; k < d; ++k) {
6280 if (k === j) {
6281 continue
6282 }
6283 b[p++] = c[k]
6284 }
6285 if (j & 1) {
6286 var tmp = b[1]
6287 b[1] = b[0]
6288 b[0] = tmp
6289 }
6290 }
6291 }
6292 return result
6293}
6294
6295
6296/***/ }),

Callers

nothing calls this directly

Calls 2

reduceFunction · 0.85
normalizeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…