Bitmap/Bresenham's line algorithm: Difference between revisions

Content added Content deleted
m (Removed magic number)
(→‎{{header|C++}}: minor bug fixed)
Line 942: Line 942:
const int maxX = (int)x2;
const int maxX = (int)x2;


for(int x=(int)x1; x<maxX; x++)
for(int x=(int)x1; x<=maxX; x++)
{
{
if(steep)
if(steep)