Hallelujah!
Bresenham's algorithm works just fine.
All your opinions have been noted.
Thanx Jasmine and Alberth.
Jasmine: I know, and I'd like to try, but the Cross-product and "somecondition" were problems for me.
Plus, in addition, I had to deal with the fact what does SGN function mean.
In Wikipedia, I found it's called signum function and that it returns either -1, 0 or +1 from a numerical value, depending if the number is positive, negative or none (zero) - for determining direction. My programming language doesn't have it, and so I had to program a sgn function myself, which could be then called with specified input so that it could return -1, 0 or 1.
Cross-product seems very difficult for me, at least now, but maybe there exist some basics I should take before that to learn something. I had to copy-paste Alberth's algorithm, modify it for my own language and then analyse it why it is so.
My best experience as far as I know, goes from observation how does things work. Only then I can understand it.
If I have some program with script inside, I go step-by-step to ensure I understand why every line is written as it is.
Maybe it would be good to post an example script that can be executed, so that I could observe step by step...
Thanx anyway, Jasmine, you've helped me alot before.
rotInMilc: Your contribution has been well noted, red-bearded Theraje guy

. An advanced system indeed. And if possible, I would apply, but it would possibly require my engine to turn from tile-based to non-tile based, wouldn't it? You meant the four corners of one tile (free or occupied), right?
_________________
Even this world is "programmed" by a Creator, the most skilled programmer of us all. What do you think of all that exists and all the environmental phenomena? He that maketh all had programmed it all and whenever needed, He can call one of the functions with input specified by Him.
