use rust_decimal::Decimal;
pub trait GeometricTransformations<Point> {
type Error;
fn translate(&self, deltas: Vec<&Decimal>) -> Result<Self, Self::Error>
where
Self: Sized;
fn scale(&self, factors: Vec<&Decimal>) -> Result<Self, Self::Error>
where
Self: Sized;
fn intersect_with(&self, other: &Self) -> Result<Vec<Point>, Self::Error>;
fn derivative_at(&self, point: &Point) -> Result<Vec<Decimal>, Self::Error>;
fn extrema(&self) -> Result<(Point, Point), Self::Error>;
fn measure_under(&self, base_value: &Decimal) -> Result<Decimal, Self::Error>;
}