Last active
January 20, 2017 14:49
-
-
Save antonkartashov/fe454df2fd668e8dd89d04caffc4ceed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const percent = 0.12; | |
const startX = getCoordinatesForPercent(0)[0] | |
const startY = getCoordinatesForPercent(0)[1] | |
const endX = getCoordinatesForPercent(percent)[0] | |
const endY = getCoordinatesForPercent(percent)[1] | |
const largeArcFlag = percent > .5 ? 1 : 0 | |
const pathData = [ | |
`M ${startX} ${startY}`, | |
`A 1 1 0 ${largeArcFlag} 1 ${endX} ${endY}`, | |
`L 0 0`, | |
].join(' '); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment