pub fn intersections(&self, with: &Road) -> Vec<Coord> {
        let mut result: Vec<Coord> = Vec::new();
        for a_segment in &self.into_segments() {
            for b_segment in &with.into_segments() {
                if let Some(intersection) = a_segment.intersection(b_segment){
                    if result.contains(&intersection) {
                        continue;
                    }
                    result.push(intersection)
                }
            }
        }
        result
    }
/// Get the intersections with another road
Get the intersections with another road
Get the intersections with another road
pub fn intersections(&self, with: &Road) -> Vec<Coord> {
        let mut result: Vec<Coord> = Vec::new();
        for a_segment in &self.into_segments() {
            for b_segment in &with.into_segments() {
                if let Some(intersection) = a_segment.intersection(b_segment){
                    if result.contains(&intersection) {
                        continue;
                    }
                    result.push(intersection)
                }
            }
        }
        result
    }
pub fn intersections ( & self , with : & Road ) -> Vec < Coord > { let mut result : Vec < Coord > = Vec :: new ( ) ; for a_segment in & self . into_segments ( ) { for b_segment in & with . into_segments ( ) { if let Some ( intersection ) = a_segment . intersection ( b_segment ) { if result . contains ( & intersection ) { continue ; } result . push ( intersection ) } } } result }
Get the intersections with another road
Get the intersections with another road
&self
with
&Road
&self
with
&Road