@zanchi/n-gon
v0.1.0
Published
Create regular polygons with n sides
Readme
n-gon
Create regular polygons with
nsides

Install
npm install @zanchi/n-gonUsage
A "polygon" is just an array of points
const { ngon, ngonVec } = require('@zanchi/n-gon');
const triangle = ngon(3, 10 /* optional size param */)
// triangle[0] === {x: 10, y: 0}
const square = ngonVec(4, 5);
//square[0] === [5, 0]