Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void circleMidpoint(int xCenter, int yCenter, int radius, int y, int blockType, Player player)
- {
- int x = 0;
- int z = radius;
- int p = (5 - radius * 4) / 4;
- if (z == 2)
- p--;
- for (int i = z; i >= 0; i--)
- placePoints(xCenter, yCenter, x, i, y, blockType, player);
- int i;
- for (; x < z; >= 0) {
- x++;
- if (p < 0) {
- p += 2 * x + 1;
- } else {
- z--;
- p += 2 * (x - z) + 1;
- }
- i = z; continue;
- placePoints(xCenter, yCenter, x, i, y, blockType, player);
- i--;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement