@types/d3-polygon
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -1,9 +0,1 @@ | ||
// Type definitions for D3JS d3-polygon module 1.0 | ||
// Project: https://github.com/d3/d3-polygon/, https://d3js.org/d3-polygon | ||
// Definitions by: Tom Wanzek <https://github.com/tomwanzek> | ||
// Alex Ford <https://github.com/gustavderdrache> | ||
// Boris Yankov <https://github.com/borisyankov> | ||
// Nathan Bierema <https://github.com/Methuselah96> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// Last module patch version validated against: 1.0.6 | ||
@@ -10,0 +2,0 @@ |
{ | ||
"name": "@types/d3-polygon", | ||
"version": "1.0.8", | ||
"description": "TypeScript definitions for D3JS d3-polygon module", | ||
"version": "1.0.9", | ||
"description": "TypeScript definitions for d3-polygon", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-polygon", | ||
"license": "MIT", | ||
@@ -9,19 +10,19 @@ "contributors": [ | ||
"name": "Tom Wanzek", | ||
"url": "https://github.com/tomwanzek", | ||
"githubUsername": "tomwanzek" | ||
"githubUsername": "tomwanzek", | ||
"url": "https://github.com/tomwanzek" | ||
}, | ||
{ | ||
"name": "Alex Ford", | ||
"url": "https://github.com/gustavderdrache", | ||
"githubUsername": "gustavderdrache" | ||
"githubUsername": "gustavderdrache", | ||
"url": "https://github.com/gustavderdrache" | ||
}, | ||
{ | ||
"name": "Boris Yankov", | ||
"url": "https://github.com/borisyankov", | ||
"githubUsername": "borisyankov" | ||
"githubUsername": "borisyankov", | ||
"url": "https://github.com/borisyankov" | ||
}, | ||
{ | ||
"name": "Nathan Bierema", | ||
"url": "https://github.com/Methuselah96", | ||
"githubUsername": "Methuselah96" | ||
"githubUsername": "Methuselah96", | ||
"url": "https://github.com/Methuselah96" | ||
} | ||
@@ -38,4 +39,4 @@ ], | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "d31fa81dac1b4b1e8697b565f277e9596934771d2c101d64623cd4a35c2e85e4", | ||
"typeScriptVersion": "3.2" | ||
"typesPublisherContentHash": "3dc38783c0a8d9fc1e7331e53cc44e54607a2dce0dd922013dd68872438b7d7b", | ||
"typeScriptVersion": "4.5" | ||
} |
@@ -5,13 +5,57 @@ # Installation | ||
# Summary | ||
This package contains type definitions for D3JS d3-polygon module (https://github.com/d3/d3-polygon/). | ||
This package contains type definitions for d3-polygon (https://github.com/d3/d3-polygon/). | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-polygon/v1. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-polygon/v1/index.d.ts) | ||
````ts | ||
// Last module patch version validated against: 1.0.6 | ||
/** | ||
* Returns the signed area of the specified polygon. If the vertices of the polygon are in counterclockwise order | ||
* (assuming a coordinate system where the origin <0,0> is in the top-left corner), the returned area is positive; | ||
* otherwise it is negative, or zero. | ||
* | ||
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on. | ||
*/ | ||
export function polygonArea(polygon: Array<[number, number]>): number; | ||
/** | ||
* Returns the centroid of the specified polygon. | ||
* | ||
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on. | ||
*/ | ||
export function polygonCentroid(polygon: Array<[number, number]>): [number, number]; | ||
/** | ||
* Returns the convex hull of the specified points using Andrew’s monotone chain algorithm. | ||
* The returned hull is represented as an array containing a subset of the input points arranged in | ||
* counterclockwise order. Returns null if points has fewer than three elements. | ||
* | ||
* @param points Array of coordinates <x0, y0>, <x1, y1> and so on. | ||
*/ | ||
export function polygonHull(points: Array<[number, number]>): Array<[number, number]> | null; | ||
/** | ||
* Returns true if and only if the specified point is inside the specified polygon. | ||
* | ||
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on. | ||
* @param point Coordinates of point <x, y>. | ||
*/ | ||
export function polygonContains(polygon: Array<[number, number]>, point: [number, number]): boolean; | ||
/** | ||
* Returns the length of the perimeter of the specified polygon. | ||
* | ||
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on. | ||
*/ | ||
export function polygonLength(polygon: Array<[number, number]>): number; | ||
```` | ||
### Additional Details | ||
* Last updated: Tue, 29 Sep 2020 22:54:47 GMT | ||
* Last updated: Wed, 18 Oct 2023 00:05:18 GMT | ||
* Dependencies: none | ||
* Global values: none | ||
# Credits | ||
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6501
0
61
36