@nlovell/polygon-coordinates
v0.0.1
Published
Generate [x,y] coordinates for a regular polygon of given sides and radius
Downloads
1
Readme
Just a little function that takes some parameters, and spits out vertex coordinates for any regular 2d polygons with n
number of sides. It was a tangent on something else I was working on, and a fun little exercise in TypeScript. I'm also using this minor project to work on documentation and testing tools, so this will likely be overkill.
Feel free to submit an issue or pull request if you want to see anything changed.
Usage
Download the library from undecided package manager
, and import the library into your project to get started.
Click here to view the resulting nonagon on Desmos!
Development
Want to contribute? Great!
To fix a bug or enhance the project, please follow these steps:
- Fork the repo
- Create a new branch (
git checkout -b branch-name
) - Make the appropriate changes in the files
- Add changes to reflect the changes made
- Commit your changes (
git commit -am 'Stuff Fixed'
) - Push to the branch (
git push origin branch-name
) - Create a Pull Request
Built with
License
MIT License - found here.