Crates.io Documentation Workflow Workflow dependency status

intersection2d.rs

2D line segment intersection detection function.\ Line-sweep algorithm implementation.

Code still in development, not ready for any purpose.

Rusty voronoi

Quick example: fish cargo run --example fltk_gui --features console_trace

API example: ```rust use intersection2d::intersect;

let line1 = geo::Line::::new( geo::Coordinate { x: 100.0, y: 150.0 }, geo::Coordinate { x: 150.0, y: 100.0 }, ); let line2 = geo::Line::::new( geo::Coordinate { x: 100.0, y: 150.0 }, geo::Coordinate { x: 150.0, y: 100.0 }, ); let rv = intersect(&line1, &line2); match _rv { Some(Intersection::Intersection(a)) => panic!("expected an overlap"), Some(Intersection::OverLap(a)) => println!("{:?}", a), None => panic!("expected an overlap"), } // you can also get a single intersection point from the Intersection enum. // Albeit geometrically incorrect, it makes things easy if let Some(rv) =rv { println!("{:?}", _rv.single()); } ```

Todo