This PR makes it possible to pass either a number or an object as the third argument of to cricleToPolygon.
This PR in necessary to be able to add more options in the future (such as choosing between left- and right-hand rule, or getting a multi polygon instead of a regular polygon).
Changes:
Behavior is the same as before if a number is passed.
If an object is passed and it has the key numberOfEdges the value of that key will be used as the value for number of edges.
Number of edges will default to 32 if an object without the key numberOfEdges is passed, or if the value of the key is undefined.
OBS
I have accidentally been using the incorrect word segments instead of edges. The last commit fixes this mixup.
The readme is not updated since this is to be a part of the version update 2.1.0
This PR makes it possible to pass either a number or an object as the third argument of to
cricleToPolygon
.This PR in necessary to be able to add more options in the future (such as choosing between left- and right-hand rule, or getting a multi polygon instead of a regular polygon).
Changes:
numberOfEdges
the value of that key will be used as the value for number of edges.numberOfEdges
is passed, or if the value of the key isundefined
.OBS
segments
instead ofedges
. The last commit fixes this mixup.this closes #13