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

Refactor away .reverse() #8

Closed johachi closed 4 years ago

johachi commented 4 years ago

This PR achieves two things:

  1. It removes the need for the .reverse() by passing bearing as a negative number instead of a positive.
  2. It directly push each coordinate to the array coordinates instead of first pushing them to flatCoordinates and then creating coordinates from flatCoordinates