Home
Random
Nearby
Log in
Settings
Donate Now
If Wikipedia is useful to you, please give today.
About Wikipedia
Disclaimers
Search
Digital differential analyzer (graphics algorithm): Difference between revisions
Article
Talk
Language
Watch
View history
Edit
Browse history interactively
← Previous edit
Next edit →
Content deleted
Content added
Visual
Wikitext
Revision as of 14:59, 20 May 2018
edit
81.103.37.132
(
talk
)
→
Program
← Previous edit
Revision as of 06:13, 30 May 2018
edit
undo
70.106.194.184
(
talk
)
→
Program
Next edit →
Line 56:
cin >> x2 >> y2;
dx =
abs
(x2 - x1);
dy =
abs
(y2 - y1);
if
(abs
(dx
)
>=
abs(
dy
)
)
step =
abs(
dx
)
;
else
step =
abs(
dy
)
;
dx = dx / step;
dy = dy / step;