Last active
May 29, 2020 12:29
-
-
Save brianfoody/7f38e14e651c0d07a146de6b4e8e0062 to your computer and use it in GitHub Desktop.
Circle Edge Point
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 calcEdgePoint = (center: number, radius: number, degree: number): Point => { | |
const degreeInRadians = degToRadians(degree); | |
return [ | |
center + Math.cos(degreeInRadians) * radius, | |
center + Math.sin(degreeInRadians) * radius | |
]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment