gabzim / circle-to-polygon

Receives a Coordinate, a Radius and a Number of edges and aproximates a circle by creating a polygon that fills its area
ISC License
113 stars 29 forks source link

Add earthRadius option #32

Closed zakjan closed 3 years ago

zakjan commented 3 years ago

Add earthRadius option, to fix compatibility issues when combining calculations with other libraries. For example, mapbox-gl-js uses mean Earth radius. Some libraries already support to customize Earth radius in a similar way (e.g. geodesy).

gabzim commented 3 years ago

Hi @zakjan just one comment, I'll merge it if you can move away from const until we can make this use babel (or hopefully typescript)