PercentDifference

Trait PercentDifference 

Source
pub trait PercentDifference<Rhs = Self> {
    type Output;

    // Required method
    fn percent_diff(self, rhs: Rhs) -> Self::Output;
}
Expand description

a trait for computing the percent difference between two values where the caller is considered the original value

Required Associated Types§

Required Methods§

Source

fn percent_diff(self, rhs: Rhs) -> Self::Output

Computes the percent difference between two values.

Implementors§

Source§

impl<A, B, C> PercentDifference<B> for A
where A: Clone, B: Sub<A, Output = C>, C: Div<A, Output = C>,