Skip to content

Instantly share code, notes, and snippets.

@JudeOsborn
Created September 16, 2012 23:42
Show Gist options
  • Save JudeOsborn/3734841 to your computer and use it in GitHub Desktop.
Save JudeOsborn/3734841 to your computer and use it in GitHub Desktop.
Find the point on a the circumference of a circle with a given angle, radius and center coordinates.
function circPoint(angle, center, radius) {
return {
x: center.x + radius * Math.cos(degreesToRadians(angle)),
y: center.y + radius * Math.sin(degreesToRadians(angle))
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment