Advertisement
Guest User

Untitled

a guest
May 27th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public static void drawCircle(float x, float y, float radius, double angleBegin, double angleEnd){
  2. GL11.glBegin(GL11.GL_TRIANGLE_FAN);
  3. GL11.glVertex2f(x, y);
  4. for(double i = angleBegin; i <= angleEnd; i += Math.PI/40){
  5. GL11.glVertex2f(x + ((float)Math.cos(i) * radius), y + ((float)Math.sin(i) * radius));
  6. break;
  7. }
  8. GL11.glEnd();
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement