Download node_modules/d3-scale/src/nice.js from NKessler/Horizon: direct link, hf CLI and curl.
- Browser
- Download file 345 Bytes
-
https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-scale/src/nice.js
- Command line
-
hf download hf://NKessler/Horizon/node_modules/d3-scale/src/nice.js
-
curl -L -o nice.js https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-scale/src/nice.js
345 Bytes
| export default function nice(domain, interval) { | |
| domain = domain.slice(); | |
| var i0 = 0, | |
| i1 = domain.length - 1, | |
| x0 = domain[i0], | |
| x1 = domain[i1], | |
| t; | |
| if (x1 < x0) { | |
| t = i0, i0 = i1, i1 = t; | |
| t = x0, x0 = x1, x1 = t; | |
| } | |
| domain[i0] = interval.floor(x0); | |
| domain[i1] = interval.ceil(x1); | |
| return domain; | |
| } | |