Skip to content

Conversation

@vargad
Copy link

@vargad vargad commented Jun 14, 2023

No fix yet, contributing a failing test:

    let intersection = intersect(
            &geo::Line::new(
                geo::Coordinate{ x: 0.0, y: 0.0 },
                geo::Coordinate{ x: 0.0, y: 100.0 },
            ),
            &geo::Line::new(
                geo::Coordinate{ x: 0.0, y: 100.0 },
                geo::Coordinate{ x: 0.0, y: 200.0 },
            ),
        );
    println!("intersection: {:?}", intersection);

I would expect it to give one overlapping point: (0.0, 100.0)

intersection: Some(Line { start: Coord { x: 0.0, y: 100.0 }, end: Coord { x: 0.0, y: 200.0 } })
tests/simple_test_1.rs|81 col 5| assertion failed: matches!(intersection.expect(\"lines should intersect\"), intersect2d ::\n    Intersection :: Intersection(coord) if coord == geo :: Coordinate\n    { x : 0.0, y : 100.0 })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant