Reputation: 1
So i have been stuck on this for a while now, I would like to make a function that gets every point on a line and excludes all the other points, given two points, given that a point is defined as (Int , Int) Thank you
Upvotes: 0
Views: 331
Reputation: 1361
Bresenham's Algorithm is probably the algorithm you want to use. There's an implementation of it on the Haskell wiki, although if you're learning Haskell it might be a good idea to try writing it yourself.
Upvotes: 1