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

Option to let user choose to follow right-hand rule or not #14

Closed johachi closed 3 years ago

johachi commented 4 years ago

Problem

Right now, the polygon returned always has its coordinates ordered counter-clockwise. It is currently not possible to get the coordinates ordered clockwise. Examples when the user might want to have the coordinates clockwise:

Proposed Solution

Add option to allow coordinates to be arranged clockwise.

This should be done after #13 has been solved.

Proposed argument:

option = { useLeftHandRule: false }

option = { useLeftHandRule: true }

Default value should default to false when missing.