Bitmap/Bresenham's line algorithm: Difference between revisions

cannot use const with std::swap, the values need to be writable!
(→‎{{header|C++}}: minor bug fixed)
(cannot use const with std::swap, the values need to be writable!)
Line 917:
=={{header|C++}}==
<lang cpp>
void Line( const float x1, const float y1, const float x2, const float y2, const Color& color )
{
// Bresenham's line algorithm
Anonymous user