Xiaolin Wu's line algorithm: Difference between revisions

Content deleted Content added
ce
-Gato- (talk | contribs)
m Prevent a division by 0
Line 48:
dx := x1 - x0
dy := y1 - y0
 
gradient := dy / dx
if dx == 0.0 then
gradient := 1.0
else
gradient := dy / dx
end if