Hi, I would translate some of the functions found here to Autoit, (http://members.chello.at/~easyfilter/bresenham.html)
How can I translate this line of code? (I don't know what the += ++ operator does):
if (r > x || err > y) err += ++x*2+1; /* e_xy+e_x > 0 or no 2nd y-step */
thanks
Point 3: I have solved the block of point 3 by breaking the code into 2 parts (thanks to trancexx's explanations in posts 6 and 7).
xx += sx; xx *= sx = x0 < x2 ? 1 : -1;
becomes
$xx += $sx
$sx = ($x0 < $x2 ? 1 : -1)
$xx *= $sx ; /* x step direction */
Point 2: Perhaps the (Long) is just for type conversion, since Autoit manage variable types automatically, I've thougt to simply remove that instruction (and it seems to work...