#[derive(Debug, PartialEq)]
pub enum ConvexHullError {
InternalError(&'static str),
MissingSupportPoint,
Unreachable,
}
impl std::fmt::Display for ConvexHullError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ConvexHullError::InternalError(reason) => write!(f, "InternalError({})", reason),
ConvexHullError::MissingSupportPoint => write!(f, "MissingSupportPoint"),
ConvexHullError::Unreachable => write!(f, "Unreachable"),
}
}
}
impl std::error::Error for ConvexHullError {}