Enum geo::algorithm::line_intersection::LineIntersection
source · pub enum LineIntersection<F: GeoFloat> {
SinglePoint {
intersection: Coord<F>,
is_proper: bool,
},
Collinear {
intersection: Line<F>,
},
}
Variants§
SinglePoint
Fields
§
is_proper: bool
For Lines which intersect in a single point, that point may be either an endpoint or in the interior of each Line. If the point lies in the interior of both Lines, we call it a proper intersection.
Note
Due to the limited precision of most float data-types, the
calculated intersection point may be snapped to one of the
end-points even though all the end-points of the two
lines are distinct points. In such cases, this field is
still set to true
. Please refer test_case:
test_central_endpoint_heuristic_failure_1
for such an
example.
Lines intersect in a single point
Collinear
Overlapping Lines intersect in a line segment
Implementations§
Trait Implementations§
source§impl<F: Clone + GeoFloat> Clone for LineIntersection<F>
impl<F: Clone + GeoFloat> Clone for LineIntersection<F>
source§fn clone(&self) -> LineIntersection<F>
fn clone(&self) -> LineIntersection<F>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<F: PartialEq + GeoFloat> PartialEq<LineIntersection<F>> for LineIntersection<F>
impl<F: PartialEq + GeoFloat> PartialEq<LineIntersection<F>> for LineIntersection<F>
source§fn eq(&self, other: &LineIntersection<F>) -> bool
fn eq(&self, other: &LineIntersection<F>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.