Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock Test(Float:radius, Float:start_pos_x, Float:start_pos_y)
- {
- new Float:x,
- Float:y = radius,
- Float:delta = 1.0-2.0*radius,
- Float:error = 0.0,
- Float:x1, Float:y1,
- Float:x2, Float:y2,
- Float:x3, Float:y3,
- Float:x4, Float:y4;
- while (y >= 0.0)
- {
- x1 = start_pos_x + x;
- y1 = start_pos_y + y;
- x2 = start_pos_x + x;
- y2 = start_pos_y - y;
- x3 = start_pos_x - x;
- y3 = start_pos_y + y;
- x4 = start_pos_x - x;
- y4 = start_pos_y - y;
- print("===================");
- printf("x = %f | y = %f", x1, y1);
- printf("x = %f | y = %f", x2, y2);
- printf("x = %f | y = %f", x3, y3);
- printf("x = %f | y = %f", x4, y4);
- error = 2.0 * (delta + y) - 1.0;
- if((delta < 0.0) && (error <= 0.0))
- {
- delta += 2.0 * ++x + 1.0;
- continue;
- }
- else if((delta > 0.0) && (error > 0.0))
- {
- delta -= 2.0 * --y + 1.0;
- continue;
- }
- delta += 2.0 * (++x - y--);
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement