Created
September 16, 2012 23:42
-
-
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.
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
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