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

Function bn2num

stackgl_modules/index.js:2273–2288  ·  view source on GitHub ↗
(b)

Source from the content-addressed store, hash-verified

2271
2272//TODO: Make this better
2273function bn2num(b) {
2274 var l = b.length
2275 var words = b.words
2276 var out = 0
2277 if (l === 1) {
2278 out = words[0]
2279 } else if (l === 2) {
2280 out = words[0] + (words[1] * 0x4000000)
2281 } else {
2282 for (var i = 0; i < l; i++) {
2283 var w = words[i]
2284 out += w * Math.pow(0x4000000, i)
2285 }
2286 }
2287 return sign(b) * out
2288}
2289
2290
2291/***/ }),

Callers 1

roundRatFunction · 0.85

Calls 1

signFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…