MCPcopy Create free account
hub / github.com/DFin/Neural-Network-Visualisation / formatThreshold

Function formatThreshold

assets/main.js:503–509  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

501 return resolved;
502 };
503 const formatThreshold = (value) => {
504 if (!Number.isFinite(value)) return "0.0000";
505 if (value >= 1) return value.toFixed(2);
506 if (value >= 0.1) return value.toFixed(3);
507 if (value >= 0.01) return value.toFixed(4);
508 return value.toFixed(5);
509 };
510 const syncThresholdUi = (value) => {
511 connectionThresholdSlider.value = String(value);
512 connectionThresholdValue.textContent = formatThreshold(value);

Callers 1

syncThresholdUiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected