Download node_modules/d3-geo/src/path/bounds.js from NKessler/Horizon: direct link, hf CLI and curl.
- Browser
- Download file 488 Bytes
-
https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-geo/src/path/bounds.js
- Command line
-
hf download hf://NKessler/Horizon/node_modules/d3-geo/src/path/bounds.js
-
curl -L -o bounds.js https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-geo/src/path/bounds.js
488 Bytes
| import noop from "../noop.js"; | |
| var x0 = Infinity, | |
| y0 = x0, | |
| x1 = -x0, | |
| y1 = x1; | |
| var boundsStream = { | |
| point: boundsPoint, | |
| lineStart: noop, | |
| lineEnd: noop, | |
| polygonStart: noop, | |
| polygonEnd: noop, | |
| result: function() { | |
| var bounds = [[x0, y0], [x1, y1]]; | |
| x1 = y1 = -(y0 = x0 = Infinity); | |
| return bounds; | |
| } | |
| }; | |
| function boundsPoint(x, y) { | |
| if (x < x0) x0 = x; | |
| if (x > x1) x1 = x; | |
| if (y < y0) y0 = y; | |
| if (y > y1) y1 = y; | |
| } | |
| export default boundsStream; | |