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

Function updateThresholdSliderBounds

assets/main.js:496–502  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

494 return maxMagnitude;
495 };
496 const updateThresholdSliderBounds = () => {
497 const sceneMax = computeSceneMaxMagnitude();
498 const fallback = Number.isFinite(fallbackMaxAttr) ? fallbackMaxAttr : 0;
499 const resolved = Math.max(sceneMax || 0, fallback, 0.01);
500 connectionThresholdSlider.max = String(resolved);
501 return resolved;
502 };
503 const formatThreshold = (value) => {
504 if (!Number.isFinite(value)) return "0.0000";
505 if (value >= 1) return value.toFixed(2);

Callers 2

applyConnectionThresholdFunction · 0.85

Calls 1

computeSceneMaxMagnitudeFunction · 0.85

Tested by

no test coverage detected