Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 13 possibility to add more options #16

Closed

Conversation

johachi
Copy link
Collaborator

@johachi johachi commented Feb 10, 2020

This PR makes it possible to pass either an object or a number to numberOfSegements. When passed as an object, the value of the key numberOfSegments will be used. Identical polygons will be returned when passing a number or passing an object.

This will close #13 and opens up for the possibility to add more options for the creation of the polygon.

TODO: Check if error should be thrown when numberOfSegemnts is an array, or if it should keep current behavior ( see this post #9 (comment) )

If error should be thrown, then add that functionallity. If error should not be thrown, add && !Array.isArray to else if (typeof options === "object") condition for getNumberOfSegments().

@johachi johachi requested a review from gabzim February 10, 2020 02:47
@johachi johachi self-assigned this Feb 10, 2020
@johachi johachi force-pushed the issue-13-possibility-to-add-more-options branch 2 times, most recently from a232293 to 66278c8 Compare February 10, 2020 03:13
@johachi johachi force-pushed the issue-13-possibility-to-add-more-options branch from 66278c8 to 5e522d2 Compare February 10, 2020 03:14
@johachi johachi closed this May 4, 2020
@johachi johachi deleted the issue-13-possibility-to-add-more-options branch May 4, 2020 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create posibility to add more options to be passed to circleToPolygon
1 participant