num_traits::sign

Function abs_sub

source
pub fn abs_sub<T: Signed>(x: T, y: T) -> T
Expand description

The positive difference of two numbers.

Returns zero if x is less than or equal to y, otherwise the difference between x and y is returned.