1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use super::Intersects;
use crate::*;
impl<T, G> Intersects<G> for Point<T>
where
T: CoordinateType,
Coordinate<T>: Intersects<G>,
{
fn intersects(&self, rhs: &G) -> bool {
self.0.intersects(rhs)
}
}
impl<T, G> Intersects<G> for MultiPoint<T>
where
T: CoordinateType,
Point<T>: Intersects<G>,
{
fn intersects(&self, rhs: &G) -> bool {
self.0.iter().any(|p| p.intersects(rhs))
}
}
symmetric_intersects_impl!(Coordinate<T>, MultiPoint<T>);
symmetric_intersects_impl!(Line<T>, MultiPoint<T>);
symmetric_intersects_impl!(Polygon<T>, MultiPoint<T>);