[−][src]Trait sp_arithmetic::ThresholdOrd
Trait for comparing two numbers with an threshold.
Returns:
Ordering::Greater
ifself
is greater thanother + threshold
.Ordering::Less
ifself
is less thanother - threshold
.Ordering::Equal
otherwise.
Required methods
pub fn tcmp(&self, other: &T, epsilon: T) -> Ordering
[src]
Compare if self
is threshold
greater or less than other
.
Implementors
impl<T> ThresholdOrd<T> for T where
T: Ord + PartialOrd + Copy + Clone + Zero + Saturating,
[src]
T: Ord + PartialOrd + Copy + Clone + Zero + Saturating,