This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #define ROUND(a) ((int)(a + 0.5)) | |
| using namespace std; | |
| int drawDDA(int x1,int y1,int x2,int y2) | |
| { | |
| float x = x1, y = y1; | |
| int len = (x2-x1)>(y2-y1)?(x2-x1):(y2-y1); | |
| float dx = (x2-x1)/(float)len; |
NewerOlder