add shadow docs, add ztop limit to pocket and trace

This commit is contained in:
Stewart Allen 2025-02-07 17:52:41 -05:00
commit a48b0f1d80
7 changed files with 138 additions and 41 deletions

View file

@ -160,6 +160,12 @@ function inRange(value, min, max) {
}
function round(v, zeros) {
if (typeof v === 'object') {
for (let [key,val] of Object.entries(v)) {
v[key] = round(val);
}
return v;
}
const prec = zeros !== undefined ? zeros : round_decimal_precision;
if (prec === 0) return v | 0;
let pow = Math.pow(10, prec);