There. I have re-derived, written and debugged a subpixel-correct line drawer using only integer maths. Are ya happy now brain? Can we sleep?
There. I have re-derived, written and debugged a subpixel-correct line drawer using only integer maths. Are ya happy now brain? Can we sleep? 3 comments
Late-night debugging of comments (the code works!) and I repeatedly confused myself by forgetting that for old-school 2D graphics algos, Y is usually DOWN, not up. Here's the final algorithm(s) written up, including source code! https://cohost.org/tomforsyth/post/648716-how-to-draw-ugly-lin |
Update - I have found my subtle bug! A perfectly reasonable assumption that is only 99.99% true. Literally a corner case. Sigh.