0.1.0 • Published 8 years ago
@zanchi/n-gon v0.1.0
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]license
0.1.0
8 years ago