Download node_modules/d3-format/src/precisionPrefix.js from NKessler/Horizon: direct link, hf CLI and curl.
- Browser
- Download file 193 Bytes
-
https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-format/src/precisionPrefix.js
- Command line
-
hf download hf://NKessler/Horizon/node_modules/d3-format/src/precisionPrefix.js
-
curl -L -o precisionPrefix.js https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-format/src/precisionPrefix.js
193 Bytes
| import exponent from "./exponent.js"; | |
| export default function(step, value) { | |
| return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step))); | |
| } | |