use crate::math::Point;
use na::RealField;
use std::mem;
#[derive(Debug, PartialEq, Clone, Copy)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum ClosestPoints<N: RealField + Copy> {
Intersecting,
WithinMargin(Point<N>, Point<N>),
Disjoint,
}
impl<N: RealField + Copy> ClosestPoints<N> {
pub fn flip(&mut self) {
if let ClosestPoints::WithinMargin(ref mut p1, ref mut p2) = *self {
mem::swap(p1, p2)
}
}
}