1 2 3 4 5 6 7 8 9 10 11
use super::Coord; #[derive(Clone, Debug, PartialEq, PartialOrd, Eq, Hash)] pub struct ConnectionPoint(Coord, Coord); impl ConnectionPoint { pub fn new(a: Coord, b: Coord) -> Self { let (a, b) = a.order_by_x(b); Self(a, b) } }