points-on-circle

1.0.5 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.5
    2
    • latest

Version History

Package Sidebar

Install

npm i points-on-circle

Weekly Downloads

6

Version

1.0.5

License

MIT

Unpacked Size

2.65 kB

Total Files

4

Last publish

Collaborators

  • evangl