pub trait PercentDiff<Rhs = Self> {
type Output;
// Required method
fn percent_diff(self, rhs: Rhs) -> Self::Output;
}
Expand description
Compute the percentage difference between two values. The percentage difference is defined as:
percent_diff = |x, y| 100 * |x - y| / ((|x| + |y|) / 2)