Code Duplication    Length = 7-8 lines in 2 locations

main/inc/lib/geometry.lib.php 2 locations

@@ 129-135 (lines=7) @@
126
127
        // we iterate w/ $dy in ]$poly[$i-1]['y'],$poly[$i-1]['y'][
128
        //    w/ $dy_inc as increment
129
        for ($dy = $poly[$i - 1]['y'] + $dy_inc;
130
            $dy != $poly[$i]['y'];
131
            $dy += $dy_inc) {
132
            $x += $pente * $dy_inc;
133
            array_push($bords[$dy], $x);
134
//            if (DEBUG) echo '/('.$x.';'.$dy.')   ';
135
        }
136
        $old_pente = $pente;
137
    }
138
@@ 176-183 (lines=8) @@
173
//        if (DEBUG) echo "init: ".$poly[$i-1]['y']."  dy_inc: ".$dy_inc.
174
//            "   end: ".$poly[0]['y'];
175
176
        for ($dy = $poly[$i - 1]['y'] + $dy_inc;
177
            $dy != $poly[0]['y'];
178
            $dy += $dy_inc)
179
        {
180
            $x += $pente * $dy_inc;
181
            array_push($bords[$dy], round($x));
182
//            if (DEBUG) echo '/('.$x.';'.$dy.')   ';
183
        }
184
    }
185
186
    /* filling the polygon */