summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@l3000.localdomain>2010-12-07 04:30:43 -0500
committerSøren Sandmann Pedersen <ssp@l3000.localdomain>2010-12-20 10:48:52 -0500
commit5388cc20451077712d3925e1ca5245b10122b0b7 (patch)
treef77f1549535c38586cc931be8eeae8735a18490f
parente646c505692a478d75011db84da7b21830947755 (diff)
Get rid of dx_sign field
-rw-r--r--dda.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/dda.c b/dda.c
index 420aeed..08e60f2 100644
--- a/dda.c
+++ b/dda.c
@@ -74,7 +74,6 @@ typedef struct
int xi;
int yi;
int bottom;
- int dx_positive;
double e;
double delta_e_big_x;
double delta_e_small_x;
@@ -98,13 +97,12 @@ edge_init (edge_t *edge, double x0, double y0, double x1, double y1)
edge->delta_e_small_x = SMALL_STEP_X * dy;
edge->delta_e_big_y = BIG_STEP_Y * dx;
edge->delta_e_small_y = SMALL_STEP_Y * dx;
- edge->dx_positive = (dx >= 0);
}
static void
edge_step (edge_t *edge, test_data_t *testdata, int i)
{
- if (edge->dx_positive)
+ if (edge->delta_e_small_y >= 0)
{
while (edge->e <= 0)
{