summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@l3000.localdomain>2010-12-06 02:53:40 -0500
committerSøren Sandmann Pedersen <ssp@l3000.localdomain>2010-12-20 10:48:50 -0500
commitb87ea4c1d5ecd243717232d89df051db52de5f60 (patch)
tree8dc52037eb2b98cc2536aea5af73129324a6e03e
parent5a2813054563948d3196fd08c15c9854e9f8c0cd (diff)
Rename y to yi
-rw-r--r--dda.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/dda.c b/dda.c
index 0642a20..1b0cfa5 100644
--- a/dda.c
+++ b/dda.c
@@ -71,8 +71,8 @@ dda (test_data_t *testdata)
double dx = (x1 - x0);
double dy = (y1 - y0);
double dxdy = dx / dy;
- double y = next_sample_y (y0);
- double x = (y - y0) * dxdy + x0;
+ double yi = next_sample_y (y0);
+ double x = (yi - y0) * dxdy + x0;
double xi = next_sample_x (x);
double e = (xi - x) * dy;
@@ -80,16 +80,16 @@ dda (test_data_t *testdata)
printf ("= = = = %f %f %f %f = = = = \n", x0, y0, x1, y1);
#endif
- while (y < next_sample_y (y1))
+ while (yi < next_sample_y (y1))
{
if (testdata->points[i++] != xi ||
- testdata->points[i++] != y)
+ testdata->points[i++] != yi)
{
printf ("error %f %f %f\n", x, testdata->points[i - 1], xi);
exit (-1);
}
- e -= sample_step_y (y) * dx;
+ e -= sample_step_y (yi) * dx;
if (dx >= 0)
{
@@ -114,7 +114,7 @@ dda (test_data_t *testdata)
}
}
- y += sample_step_y (y);
+ yi += sample_step_y (yi);
}
}