Trait polkadot_sdk_frame::arithmetic::ThresholdOrd
pub trait ThresholdOrd<T> {
// Required method
fn tcmp(&self, other: &T, threshold: T) -> Ordering;
}
Expand description
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.