Skip to content

A fast, iterator-based integer-only implementation of Bresenham's line algorithm in Rust.

Notifications You must be signed in to change notification settings

mbr/bresenham-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bresenham-rs

Implements Bresenham's line drawing algorithm in Rust using an iterator over all points in the line. Most, if not all overhead should evaporate when inlined by the compiler.

Example use:

for (x, y) in Bresenham::new((0, 1), (6, 4)) {
    println!("{}, {}", x, y);
}

Will print:

(0, 1)
(1, 1)
(2, 2)
(3, 2)
(4, 3)
(5, 3)

About

A fast, iterator-based integer-only implementation of Bresenham's line algorithm in Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages