diff options
author | Søren Sandmann Pedersen <ssp@l3000.localdomain> | 2010-12-07 04:30:43 -0500 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@l3000.localdomain> | 2010-12-20 10:48:52 -0500 |
commit | 5388cc20451077712d3925e1ca5245b10122b0b7 (patch) | |
tree | f77f1549535c38586cc931be8eeae8735a18490f | |
parent | e646c505692a478d75011db84da7b21830947755 (diff) |
Get rid of dx_sign field
-rw-r--r-- | dda.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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) { |