Created
September 22, 2019 02:54
-
-
Save BenMaydan/fee364153e6b8c33b810e5286c7485f2 to your computer and use it in GitHub Desktop.
Java plug in "function" to determine the x and y coordinates of a point of a circle at a certain radian. The way this is written the angle 0 starts on the far right of the circle and goes clockwise.
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
class Circle() { | |
float[] pointOnCircle(int x, int y, float rad, float radians) { | |
return new float[] {x+(rad * cos(radians)), y+(rad * sin(radians))}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment