Trait sp_arithmetic::ThresholdOrd[][src]

pub trait ThresholdOrd<T> {
    fn tcmp(&self, other: &T, epsilon: T) -> Ordering;
}
Expand description

Trait for comparing two numbers with an threshold.

Returns:

  • Ordering::Greater if self is greater than other + threshold.
  • Ordering::Less if self is less than other - threshold.
  • Ordering::Equal otherwise.

Required methods

Compare if self is threshold greater or less than other.

Implementors