Last active
January 26, 2017 20:43
-
-
Save davidgilbertson/2cf7bd1f91cc8fd39aa9e553e639b9fd to your computer and use it in GitHub Desktop.
This file contains 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