Skip to content

Class for a sector of a circle. Supports export to SVG-path string.

Notifications You must be signed in to change notification settings

datatypesjs/circle-sector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Circle Sector

Class for a sector of a circle. Supports export to SVG-path string.

Installation

npm install --save circle-sector

Usage

import CircleSector from 'circle-sector'

const sector = new CircleSector({
	x: 10,
	y: 15,
	radius: 5,
	startAngleInDeg: 30,
	endAngleInDeg: 85,
})

console.log(sector.svgPath)

// M10,15
// L14.330127018922195,12.5
// A5,5 0 0 0 10.43577871373829,10.019026509541273
// Z

About

Class for a sector of a circle. Supports export to SVG-path string.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published