Download node_modules/d3-interpolate/src/discrete.js from NKessler/Horizon: direct link, hf CLI and curl.
- Browser
- Download file 154 Bytes
-
https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-interpolate/src/discrete.js
- Command line
-
hf download hf://NKessler/Horizon/node_modules/d3-interpolate/src/discrete.js
-
curl -L -o discrete.js https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-interpolate/src/discrete.js
154 Bytes
| export default function(range) { | |
| var n = range.length; | |
| return function(t) { | |
| return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; | |
| }; | |
| } | |