Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DavidHDev/react-bits
/ decay
Function
decay
src/content/Components/ElasticSlider/ElasticSlider.jsx:176–185 ·
view source on GitHub ↗
(value, max)
Source
from the content-addressed store, hash-verified
174
}
175
176
function decay(value, max) {
177
if (max === 0) {
178
return 0;
179
}
180
181
const entry = value / max;
182
const sigmoid = 2 * (1 / (1 + Math.exp(-entry)) - 0.5);
183
184
return sigmoid * max;
185
}
Callers
1
Slider
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected