diff --git a/README.md b/README.md index d762a5a..e193383 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,11 @@ Turf.js | GeoJSONKit-Turf [turf-area](https://github.com/Turfjs/turf/blob/master/packages/turf-area/) | `GeoJSON.Polygon.area` [turf-bearing](https://turfjs.org/docs/#bearing) | `GeoJSON.Position.direction(to:)`
`RadianCoordinate2D.direction(to:)` [turf-bezier-spline](https://github.com/Turfjs/turf/tree/master/packages/turf-bezier-spline/) | `GeoJSON.LineString.bezier(resolution:sharpness:)` -[turf-boolean-point-in-polygon](https://github.com/Turfjs/turf/tree/master/packages/turf-boolean-point-in-polygon) | `GeoJSON.Polygon.contains(_:ignoreBoundary:)` +[turf-boolean-point-in-polygon](https://github.com/Turfjs/turf/tree/master/packages/turf-boolean-point-in-polygon) | `GeoJSON.Polygon.contains(_:)` [turf-center](http://turfjs.org/docs/#center) | `GeoJSON.Geometry.center()` | [turf-center-of-mass](http://turfjs.org/docs/#centerOfMass) | `GeoJSON.Geometry.centerOfMass()` | [turf-centroid](http://turfjs.org/docs/#centroid) | `GeoJSON.Geometry.centroid()` | -[turf-circle](https://turfjs.org/docs/#circle) | `GeoJSON.Polygon(center:radius:vertices:)` | +[turf-circle](https://turfjs.org/docs/#circle) | `GeoJSON.Polygon(center:radius:)` | [turf-convex](https://turfjs.org/docs/#convex) | `GeoJSON.convexHull()`
`Collection.convexHull()` | [turf-destination](https://github.com/Turfjs/turf/tree/master/packages/turf-destination/) | `GeoJSON.Position.coordinate(at:facing:)`
`RadianCoordinate2D.coordinate(at:facing:)` [turf-distance](https://github.com/Turfjs/turf/tree/master/packages/turf-distance/) | `GeoJSON.Position.distance(to:)`
`RadianCoordinate2D.distance(to:)` diff --git a/Sources/GeoJSONKitTurf/Turf+Polygon.swift b/Sources/GeoJSONKitTurf/Turf+Polygon.swift index 45db2c3..fd145af 100644 --- a/Sources/GeoJSONKitTurf/Turf+Polygon.swift +++ b/Sources/GeoJSONKitTurf/Turf+Polygon.swift @@ -11,10 +11,10 @@ extension GeoJSON.Polygon { - Parameter center: The center coordinate for the polygon. - Parameter radius: The radius of the polygon, measured in meters. - Parameter vertices: The number of vertices the polygon will have. - The recommended amount is 64. + The recommended and default amount is 64. - Returns: A polygon shape which approximates a circle. */ - public init(center: GeoJSON.Position, radius: GeoJSON.Distance, vertices: Int) { + public init(center: GeoJSON.Position, radius: GeoJSON.Distance, vertices: Int = 64) { // The first and last coordinates in a polygon must be identical, // which is why we're using the inclusive range operator in this case. // Ported from https://github.com/Turfjs/turf/blob/17002ccd57e04e84ddb38d7e3ac8ede35b019c58/packages/turf-circle/index.ts