Skip to content

Instantly share code, notes, and snippets.

@brianfoody
Last active May 29, 2020 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianfoody/7f38e14e651c0d07a146de6b4e8e0062 to your computer and use it in GitHub Desktop.
Save brianfoody/7f38e14e651c0d07a146de6b4e8e0062 to your computer and use it in GitHub Desktop.
Circle Edge Point
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