Bitmap/Bresenham's line algorithm: Difference between revisions

Content added Content deleted
m (→‎{{header|Phix}}: minor tidy)
Line 3,639: Line 3,639:
coordinates.push(Point { x: current_x, y: current_y });
coordinates.push(Point { x: current_x, y: current_y });
} else if error2 <= i32::abs(dx) {
} else if error2 <= i32::abs(dx) {
error += dx;
error -= dx;
current_y += sy;
current_y += sy;
coordinates.push(Point { x: current_x, y: current_y });
coordinates.push(Point { x: current_x, y: current_y });