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

Function roundUpPow10

stackgl_modules/index.js:18441–18451  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

18439}
18440
18441function roundUpPow10(x) {
18442 var y = Math.round(Math.log(Math.abs(x)) / Math.log(10))
18443 if(y < 0) {
18444 var base = Math.round(Math.pow(10, -y))
18445 return Math.ceil(x*base) / base
18446 } else if(y > 0) {
18447 var base = Math.round(Math.pow(10, y))
18448 return Math.ceil(x/base) * base
18449 }
18450 return Math.ceil(x)
18451}
18452
18453function defaultBool(x) {
18454 if(typeof x === 'boolean') {

Callers 1

redrawFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…