MCPcopy
hub / github.com/tdewolff/minify / round

Function round

_benchmarks/sample_echarts.js:6668–6677  ·  view source on GitHub ↗
(x, precision, returnStr)

Source from the content-addressed store, hash-verified

6666 return percent == null ? NaN : +percent;
6667 }
6668 function round(x, precision, returnStr) {
6669 if (precision == null) {
6670 precision = 10;
6671 } // Avoid range error
6672
6673
6674 precision = Math.min(Math.max(0, precision), 20);
6675 x = (+x).toFixed(precision);
6676 return returnStr ? x : +x;
6677 }
6678 /**
6679 * Inplacd asc sort arr.
6680 * The input arr will be modified.

Callers 9

relativeTime$1Function · 0.85
sample_jqueryui.jsFile · 0.85
interpolateRawValuesFunction · 0.85
sample_echarts.jsFile · 0.85
littleThanFunction · 0.85
createPolarClipPathFunction · 0.85
relativeTimeFunction · 0.85
moment.jsFile · 0.85
jquery-ui.jsFile · 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…