Anonymous user
Draw a sphere: Difference between revisions
m
→{{header|C}}: floating math, duh
m (→{{header|C}}: floating math, duh) |
|||
Line 39:
x = i + .5;
for (j = floor(-2 * R); j <= ceil(2 * R); j++) {
y = j / 2. + .5;
if (x * x + y * y <= R * R) {
vec[0] = x;
|