@thi.ng/geom-hull
Advanced tools
Comparing version 0.0.30 to 0.0.31
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.0.31](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-hull@0.0.30...@thi.ng/geom-hull@0.0.31) (2020-01-24) | ||
**Note:** Version bump only for package @thi.ng/geom-hull | ||
## [0.0.30](https://github.com/thi-ng/umbrella/compare/@thi.ng/geom-hull@0.0.29...@thi.ng/geom-hull@0.0.30) (2019-11-30) | ||
@@ -8,0 +16,0 @@ |
@@ -5,8 +5,9 @@ /** | ||
* | ||
* https://en.wikipedia.org/wiki/Graham_scan | ||
* http://c.thi.ng/ | ||
* - {@link https://en.wikipedia.org/wiki/Graham_scan} | ||
* - {@link http://c.thi.ng/} | ||
* | ||
* @param pts input points | ||
* @param eps tolerance for colinear neighbor detection | ||
* @param pts - input points | ||
* @param eps - tolerance for colinear neighbor detection | ||
*/ | ||
export declare const grahamScan2: (pts: import("@thi.ng/api").ArrayLikeIterable<number>[], eps?: number) => import("@thi.ng/api").ArrayLikeIterable<number>[]; | ||
//# sourceMappingURL=graham-scan.d.ts.map |
@@ -7,7 +7,7 @@ import { EPS } from "@thi.ng/math"; | ||
* | ||
* https://en.wikipedia.org/wiki/Graham_scan | ||
* http://c.thi.ng/ | ||
* - {@link https://en.wikipedia.org/wiki/Graham_scan} | ||
* - {@link http://c.thi.ng/} | ||
* | ||
* @param pts input points | ||
* @param eps tolerance for colinear neighbor detection | ||
* @param pts - input points | ||
* @param eps - tolerance for colinear neighbor detection | ||
*/ | ||
@@ -57,10 +57,10 @@ export const grahamScan2 = (pts, eps = EPS) => { | ||
* | ||
* @see thi.ng/vectors/signedArea2 | ||
* {@link @thi.ng/vectors#signedArea2} | ||
* | ||
* @param ax | ||
* @param ay | ||
* @param bx | ||
* @param by | ||
* @param cx | ||
* @param cy | ||
* @param ax - | ||
* @param ay - | ||
* @param bx - | ||
* @param by - | ||
* @param cx - | ||
* @param cy - | ||
*/ | ||
@@ -71,3 +71,3 @@ const notCCW = (ax, ay, bx, by, cx, cy, eps) => (by - ay) * (cx - ax) >= (bx - ax) * (cy - ay) - eps; | ||
* | ||
* @param pts | ||
* @param pts - | ||
*/ | ||
@@ -74,0 +74,0 @@ const findMin = (pts) => { |
export * from "./graham-scan"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@thi.ng/math")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/math"],e):e(((t=t||self).thi=t.thi||{},t.thi.ng=t.thi.ng||{},t.thi.ng.geomHull={}),t.thi.ng.math)}(this,(function(t,e){"use strict";const n=Math.atan2,o=(t,e,n,o,i,r,f)=>(o-e)*(i-t)>=(n-t)*(r-e)-f,i=t=>{let e,n,o=t.length-1,i=o,[r,f]=t[o];for(;--o>=0;)((n=(e=t[o])[1])<f||n===f&&e[0]<r)&&(r=e[0],f=n,i=o);return i};t.grahamScan2=(t,r=e.EPS)=>{const f=t.length;if(f<=3)return t.slice();let h,s,c,u,l,p,a=1;const g=i(t);[l,p]=t[g];const d=[];for(h=0;h<f;h++)s=t[h],d[h]={p:s,t:n(s[1]-p,s[0]-l)};d.sort((t,e)=>t.t!==e.t?t.t-e.t:t.p[0]-e.p[0]);const m=[d[0].p];for(h=1;h<f;h++){for(s=m[a-2],c=m[a-1],l=(u=d[h].p)[0],p=u[1];a>1&&o(s[0],s[1],c[0],c[1],l,p,r)||1===a&&c[0]===l&&c[1]===p;)c=s,s=m[--a-2];m[a++]=u}return m.length=a,m},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@thi.ng/math")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/math"],e):e(((t=t||self).thi=t.thi||{},t.thi.ng=t.thi.ng||{},t.thi.ng.geomHull={}),t.thi.ng.math)}(this,(function(t,e){"use strict";const n=Math.atan2,o=(t,e,n,o,i,r,f)=>(o-e)*(i-t)>=(n-t)*(r-e)-f,i=t=>{let e,n,o=t.length-1,i=o,[r,f]=t[o];for(;--o>=0;)e=t[o],n=e[1],(n<f||n===f&&e[0]<r)&&(r=e[0],f=n,i=o);return i};t.grahamScan2=(t,r=e.EPS)=>{const f=t.length;if(f<=3)return t.slice();let h,s,c,u,l,p,a=1;const g=i(t);[l,p]=t[g];const d=[];for(h=0;h<f;h++)s=t[h],d[h]={p:s,t:n(s[1]-p,s[0]-l)};d.sort((t,e)=>t.t!==e.t?t.t-e.t:t.p[0]-e.p[0]);const m=[d[0].p];for(h=1;h<f;h++){for(s=m[a-2],c=m[a-1],u=d[h].p,l=u[0],p=u[1];a>1&&o(s[0],s[1],c[0],c[1],l,p,r)||1===a&&c[0]===l&&c[1]===p;)a--,c=s,s=m[a-2];m[a++]=u}return m.length=a,m},Object.defineProperty(t,"__esModule",{value:!0})})); |
{ | ||
"name": "@thi.ng/geom-hull", | ||
"version": "0.0.30", | ||
"version": "0.0.31", | ||
"description": "Fast 2D convex hull (Graham Scan)", | ||
@@ -26,17 +26,19 @@ "module": "./index.js", | ||
"doc": "node_modules/.bin/typedoc --mode modules --out doc src", | ||
"doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose", | ||
"pub": "yarn build:release && yarn publish --access public" | ||
}, | ||
"devDependencies": { | ||
"@istanbuljs/nyc-config-typescript": "^0.1.3", | ||
"@types/mocha": "^5.2.6", | ||
"@types/node": "^12.12.11", | ||
"mocha": "^6.2.2", | ||
"nyc": "^14.0.0", | ||
"ts-node": "^8.5.2", | ||
"typedoc": "^0.15.2", | ||
"typescript": "^3.7.2" | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
"@microsoft/api-extractor": "^7.7.7", | ||
"@types/mocha": "^5.2.7", | ||
"@types/node": "^13.5.0", | ||
"mocha": "^7.0.0", | ||
"nyc": "^15.0.0", | ||
"ts-node": "^8.6.2", | ||
"typedoc": "^0.16.8", | ||
"typescript": "^3.7.5" | ||
}, | ||
"dependencies": { | ||
"@thi.ng/math": "^1.5.1", | ||
"@thi.ng/vectors": "^4.0.1" | ||
"@thi.ng/math": "^1.6.0", | ||
"@thi.ng/vectors": "^4.0.2" | ||
}, | ||
@@ -58,3 +60,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "36c4d9e967bd80ccdbfa0f4a42f594080f95f105" | ||
"gitHead": "93d8af817724c1c5b06d80ffa2492fe5b4fb7bc4" | ||
} |
@@ -38,6 +38,8 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
Package sizes (gzipped): ESM: 0.4KB / CJS: 0.5KB / UMD: 0.6KB | ||
## Dependencies | ||
- [@thi.ng/math](https://github.com/thi-ng/umbrella/tree/master/packages/math) | ||
- [@thi.ng/vectors](https://github.com/thi-ng/umbrella/tree/master/packages/vectors) | ||
- [@thi.ng/math](https://github.com/thi-ng/umbrella/tree/develop/packages/math) | ||
- [@thi.ng/vectors](https://github.com/thi-ng/umbrella/tree/develop/packages/vectors) | ||
@@ -47,3 +49,3 @@ ## Usage examples | ||
Several demos in this repo's | ||
[/examples](https://github.com/thi-ng/umbrella/tree/master/examples) | ||
[/examples](https://github.com/thi-ng/umbrella/tree/develop/examples) | ||
directory are using this package. | ||
@@ -55,5 +57,5 @@ | ||
 | ||
 | ||
[Live demo](https://demo.thi.ng/umbrella/geom-convex-hull/) | [Source](https://github.com/thi-ng/umbrella/tree/master/examples/geom-convex-hull) | ||
[Live demo](https://demo.thi.ng/umbrella/geom-convex-hull/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-convex-hull) | ||
@@ -77,2 +79,2 @@ ## API | ||
© 2013 - 2019 Karsten Schmidt // Apache Software License 2.0 | ||
© 2013 - 2020 Karsten Schmidt // Apache Software License 2.0 |
@@ -33,2 +33,4 @@ # ${pkg.name} | ||
${pkg.size} | ||
## Dependencies | ||
@@ -35,0 +37,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
31355
77
9
13
Updated@thi.ng/math@^1.6.0
Updated@thi.ng/vectors@^4.0.2