fmt: snap |n| < half a cent to exact 0 — kills $-0.00 from float-residue spend

This commit is contained in:
Inferencebot committed 2026-10-19 12:04:58 -06:00
1 parent b8f737d1ee
commit 71c4e68a5c
1 file changed
+1 -1
+1 -1
View File
@@ -380,7 +380,7 @@ function flash(msg, ok) {
setTimeout(() => { f.className = 'flash'; }, 6000); setTimeout(() => { f.className = 'flash'; }, 6000);
} }
function fmt(n) { return '$' + (Number(n) || 0).toFixed(2); } function fmt(n) { const v = Math.abs(Number(n)) < 0.005 ? 0 : (Number(n) || 0); return '$' + v.toFixed(2); }
async function loadModels() { async function loadModels() {
try { try {