1.0.5 • Published 5 years ago

points-on-circle v1.0.5

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
5 years ago

points-on-circle

Given the number of points returns an array of xy coordinates on the circle's perimeter. Optional: You can give the circle's radius and center point (x , y)

Usage

NPM

pointsOnCircle(NumberOfPoints, radius = 1, x = 0, y = 0)

Where x and y is the center of the circle

let pointsOnCircle = require('points-on-circle')

let numPoints = 4
let rad = 10
let x = width/2
let y = height/2
let points = pointsOnCircle(numPoints ,rad, x, y)
console.log(points) 

License

MIT

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago